Skip to content

Commit 91c76d4

Browse files
committed
increase buffer value, add ratio tag
1 parent 222f725 commit 91c76d4

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

internal/internal_event_handlers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ import (
4444

4545
const (
4646
queryResultSizeLimit = 2000000 // 2MB
47-
historySizeEstimationBuffer = 1 * 128 // 128B
47+
historySizeEstimationBuffer = 3 * 128 // 128B
4848
)
4949

5050
// Make sure that interfaces are implemented

internal/internal_task_handlers.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -994,6 +994,7 @@ ProcessEvents:
994994
zap.Int64("HistorySizeEstimation", w.workflowInfo.TotalHistoryBytes),
995995
zap.Int64("ActualHistorySize", w.workflowInfo.HistoryBytesServer),
996996
zap.Int64("HistorySizeDiff", w.workflowInfo.TotalHistoryBytes-w.workflowInfo.HistoryBytesServer),
997+
zap.Float64("DiffRatio", float64(w.workflowInfo.TotalHistoryBytes)/float64(w.workflowInfo.HistoryBytesServer)),
997998
zap.String("workflowType", w.workflowInfo.WorkflowType.Name))
998999
w.wth.metricsScope.GetTaggedScope("workflowtype", w.workflowInfo.WorkflowType.Name).Gauge("cadence-server-historysize").Update(float64(w.workflowInfo.HistoryBytesServer))
9991000
w.wth.metricsScope.GetTaggedScope("workflowtype", w.workflowInfo.WorkflowType.Name).Gauge("cadence-client-historysize").Update(float64(historySizeEstimation))

0 commit comments

Comments
 (0)