cockroach icon indicating copy to clipboard operation
cockroach copied to clipboard

rac2: add token counter and stream metrics

Open kvoli opened this issue 6 months ago • 4 comments

This commit introduces metrics related to stream eval tokens and stream send tokens. Hooking up these metrics to the registry will be in a subsequent commit.

There are two separate metric structs used:

  1. tokenCounterMetrics, which only contains counter and is shared among all tokenCounters on the same node. Each tokenCounter updates the shared counters after adjust is called.
  2. tokenStreamMetrics, which is updated periodically by calling UpdateMetricGauges via the StreamTokenCounterProvider, which is one per node.

Metrics related to WaitForEval (as well as blocked stream logging) are also deferred to a subsequent commit.

Part of: https://github.com/cockroachdb/cockroach/issues/128031 Release note: None

kvoli avatar Aug 20 '24 19:08 kvoli