From 762ad13f4cfdcd7a03f3f911eaa665f696d73b51 Mon Sep 17 00:00:00 2001 From: Geir Storli Date: Mon, 4 Dec 2017 19:55:17 +0000 Subject: Add metric for replay time of the transaction log during start-up. --- .../src/vespa/searchcore/proton/metrics/trans_log_server_metrics.cpp | 4 +++- .../src/vespa/searchcore/proton/metrics/trans_log_server_metrics.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'searchcore') diff --git a/searchcore/src/vespa/searchcore/proton/metrics/trans_log_server_metrics.cpp b/searchcore/src/vespa/searchcore/proton/metrics/trans_log_server_metrics.cpp index 00d4532a44e..00a7e9b9140 100644 --- a/searchcore/src/vespa/searchcore/proton/metrics/trans_log_server_metrics.cpp +++ b/searchcore/src/vespa/searchcore/proton/metrics/trans_log_server_metrics.cpp @@ -12,7 +12,8 @@ TransLogServerMetrics::DomainMetrics::DomainMetrics(metrics::MetricSet *parent, : metrics::MetricSet("transactionlog", {{"documenttype", documentType}}, "Transaction log metrics for a document type", parent), entries("entries", "", "The current number of entries in the transaction log", this), - diskUsage("disk_usage", "", "The disk usage (in bytes) of the transaction log", this) + diskUsage("disk_usage", "", "The disk usage (in bytes) of the transaction log", this), + replayTime("replay_time", "", "The replay time (in seconds) of the transaction log during start-up", this) { } @@ -23,6 +24,7 @@ TransLogServerMetrics::DomainMetrics::update(const DomainInfo &stats) { entries.set(stats.numEntries); diskUsage.set(stats.byteSize); + replayTime.set(stats.maxSessionRunTime.count()); } void diff --git a/searchcore/src/vespa/searchcore/proton/metrics/trans_log_server_metrics.h b/searchcore/src/vespa/searchcore/proton/metrics/trans_log_server_metrics.h index c4620f46f4f..830d643e93e 100644 --- a/searchcore/src/vespa/searchcore/proton/metrics/trans_log_server_metrics.h +++ b/searchcore/src/vespa/searchcore/proton/metrics/trans_log_server_metrics.h @@ -17,6 +17,7 @@ public: { metrics::LongValueMetric entries; metrics::LongValueMetric diskUsage; + metrics::DoubleValueMetric replayTime; typedef std::unique_ptr UP; DomainMetrics(metrics::MetricSet *parent, const vespalib::string &documentType); -- cgit v1.2.3