cockroach
cockroach copied to clipboard
rac2: add token counter and stream metrics
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:
-
tokenCounterMetrics
, which only contains counter and is shared among alltokenCounter
s on the same node. EachtokenCounter
updates the shared counters afteradjust
is called. -
tokenStreamMetrics
, which is updated periodically by callingUpdateMetricGauges
via theStreamTokenCounterProvider
, 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