Skip to content

Commit 72ab5cd

Browse files
authored
Merge pull request #57 from tigrisdata/pboros/storage-queue
have storage queue as a metric similar to log queue
2 parents 193421a + 97a82b9 commit 72ab5cd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

metrics/group_processes.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,10 @@ func (p *ProcessesMetricGroup) GetMetrics(status *models.FullStatus) {
236236
metrics["durability_bytes"] = role.DurableBytes.Counter
237237
}
238238

239+
// Storage queue size, if this is growing, it means the storages can't keep up with the load
240+
// and they need to be scaled out.
241+
metrics["storage_queue_length"] = role.InputBytes.Counter - role.DurableBytes.Counter
242+
239243
if role.ReadLatencyStatistics != nil {
240244
readLatScope := p.GetScopeOrExit("read_lat")
241245
medianTags := p.getLatencyTags(processName, &process, "0.5")

0 commit comments

Comments
 (0)