Add latency sample for getKey.
This commit is contained in:
parent
3df6a86d22
commit
a8d3349898
|
@ -1122,6 +1122,7 @@ public:
|
|||
Counter changeFeedDiskReads;
|
||||
|
||||
LatencySample readLatencySample;
|
||||
LatencySample readKeyLatencySample;
|
||||
LatencySample readValueLatencySample;
|
||||
LatencySample readRangeLatencySample;
|
||||
LatencySample readVersionWaitSample;
|
||||
|
@ -1164,6 +1165,10 @@ public:
|
|||
self->thisServerID,
|
||||
SERVER_KNOBS->LATENCY_METRICS_LOGGING_INTERVAL,
|
||||
SERVER_KNOBS->LATENCY_SAMPLE_SIZE),
|
||||
readKeyLatencySample("ReadKeyLatencyMetrics",
|
||||
self->thisServerID,
|
||||
SERVER_KNOBS->LATENCY_METRICS_LOGGING_INTERVAL,
|
||||
SERVER_KNOBS->LATENCY_SAMPLE_SIZE),
|
||||
readValueLatencySample("ReadValueLatencyMetrics",
|
||||
self->thisServerID,
|
||||
SERVER_KNOBS->LATENCY_METRICS_LOGGING_INTERVAL,
|
||||
|
@ -5015,6 +5020,8 @@ ACTOR Future<Void> getKeyQ(StorageServer* data, GetKeyRequest req) {
|
|||
|
||||
double duration = g_network->timer() - req.requestTime();
|
||||
data->counters.readLatencySample.addMeasurement(duration);
|
||||
data->counters.readKeyLatencySample.addMeasurement(duration);
|
||||
|
||||
if (data->latencyBandConfig.present()) {
|
||||
int maxReadBytes =
|
||||
data->latencyBandConfig.get().readConfig.maxReadBytes.orDefault(std::numeric_limits<int>::max());
|
||||
|
|
Loading…
Reference in New Issue