summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorGeir Storli <geirst@oath.com>2017-12-04 19:55:17 +0000
committerGeir Storli <geirst@oath.com>2017-12-04 19:55:17 +0000
commit762ad13f4cfdcd7a03f3f911eaa665f696d73b51 (patch)
treeb358fdef391e3a7c179b5348c832602d9aafd3c6 /searchcore
parentdc88496506f5c55a447a8e6b43f97f3127a08dc0 (diff)
Add metric for replay time of the transaction log during start-up.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/proton/metrics/trans_log_server_metrics.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/metrics/trans_log_server_metrics.h1
2 files changed, 4 insertions, 1 deletions
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<DomainMetrics> UP;
DomainMetrics(metrics::MetricSet *parent, const vespalib::string &documentType);