Skip to content

Commit b563ac7

Browse files
committed
chore: change the resolution of reply latency to measurement to ns
1 parent 1e14f80 commit b563ac7

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/facade/reply_builder.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ void SinkReplyBuilder::Send() {
181181

182182
uint64_t after_ns = util::fb2::ProactorBase::GetMonotonicTimeNs();
183183
reply_stats.send_stats.count++;
184-
reply_stats.send_stats.total_duration += (after_ns - pin.timestamp_ns) / 1'000;
184+
reply_stats.send_stats.total_duration += (after_ns - pin.timestamp_ns);
185185
DVLOG(2) << "Finished writing " << total_size_ << " bytes";
186186
}
187187

src/server/server_family.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1713,7 +1713,7 @@ void PrintPrometheusMetrics(uint64_t uptime, const Metrics& m, DflyCmd* dfly_cmd
17131713
MetricType::COUNTER, &resp->body());
17141714
{
17151715
AppendMetricWithoutLabels("reply_duration_seconds", "",
1716-
m.facade_stats.reply_stats.send_stats.total_duration * 1e-6,
1716+
m.facade_stats.reply_stats.send_stats.total_duration * 1e-9,
17171717
MetricType::COUNTER, &resp->body());
17181718
AppendMetricWithoutLabels("reply_total", "", m.facade_stats.reply_stats.send_stats.count,
17191719
MetricType::COUNTER, &resp->body());
@@ -3015,8 +3015,6 @@ string ServerFamily::FormatInfoMetrics(const Metrics& m, std::string_view sectio
30153015
append("defrag_attempt_total", m.shard_stats.defrag_attempt_total);
30163016
append("defrag_realloc_total", m.shard_stats.defrag_realloc_total);
30173017
append("defrag_task_invocation_total", m.shard_stats.defrag_task_invocation_total);
3018-
append("reply_count", reply_stats.send_stats.count);
3019-
append("reply_latency_usec", reply_stats.send_stats.total_duration);
30203018

30213019
// Number of connections that are currently blocked on grabbing interpreter.
30223020
append("blocked_on_interpreter", m.coordinator_stats.blocked_on_interpreter);

0 commit comments

Comments
 (0)