summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorGeir Storli <geirst@oath.com>2018-05-04 11:50:51 +0000
committerGeir Storli <geirst@oath.com>2018-05-04 11:50:51 +0000
commit7c48f2037bb15b9044c31b257d2ccc7511810b4e (patch)
tree2aa0235f0bfb01ac077c1bd7257e8ab89180c2b1 /searchcore
parent08af92f3291180ffe6dabc48e449abde3695992d (diff)
Add query latency and query collateral time to set of rank profile metrics.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/proton/metrics/documentdb_tagged_metrics.cpp8
-rw-r--r--searchcore/src/vespa/searchcore/proton/metrics/documentdb_tagged_metrics.h2
2 files changed, 9 insertions, 1 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/metrics/documentdb_tagged_metrics.cpp b/searchcore/src/vespa/searchcore/proton/metrics/documentdb_tagged_metrics.cpp
index cf9db4797f8..ab0b187272a 100644
--- a/searchcore/src/vespa/searchcore/proton/metrics/documentdb_tagged_metrics.cpp
+++ b/searchcore/src/vespa/searchcore/proton/metrics/documentdb_tagged_metrics.cpp
@@ -124,7 +124,9 @@ DocumentDBTaggedMetrics::MatchingMetrics::RankProfileMetrics::RankProfileMetrics
limitedQueries("limited_queries", "", "Number of queries limited in match phase", this),
matchTime("match_time", "", "Average time (sec) for matching a query", this),
groupingTime("grouping_time", "", "Average time (sec) spent on grouping", this),
- rerankTime("rerank_time", "", "Average time (sec) spent on 2nd phase ranking", this)
+ rerankTime("rerank_time", "", "Average time (sec) spent on 2nd phase ranking", this),
+ queryCollateralTime("query_collateral_time", "", "Average time (sec) spent setting up and tearing down queries", this),
+ queryLatency("query_latency", "", "Average latency (sec) when matching a query", this)
{
for (size_t i = 0; i < numDocIdPartitions; ++i) {
vespalib::string partition(vespalib::make_string("docid_part%02ld", i));
@@ -168,6 +170,10 @@ DocumentDBTaggedMetrics::MatchingMetrics::RankProfileMetrics::update(const Match
stats.groupingTimeMin(), stats.groupingTimeMax());
rerankTime.addValueBatch(stats.rerankTimeAvg(), stats.rerankTimeCount(),
stats.rerankTimeMin(), stats.rerankTimeMax());
+ queryCollateralTime.addValueBatch(stats.queryCollateralTimeAvg(), stats.queryCollateralTimeCount(),
+ stats.queryCollateralTimeMin(), stats.queryCollateralTimeMax());
+ queryLatency.addValueBatch(stats.queryLatencyAvg(), stats.queryLatencyCount(),
+ stats.queryLatencyMin(), stats.queryLatencyMax());
if (stats.getNumPartitions() > 0) {
if (stats.getNumPartitions() <= partitions.size()) {
for (size_t i = 0; i < stats.getNumPartitions(); ++i) {
diff --git a/searchcore/src/vespa/searchcore/proton/metrics/documentdb_tagged_metrics.h b/searchcore/src/vespa/searchcore/proton/metrics/documentdb_tagged_metrics.h
index fa5eff0b0b8..2392c82fc0f 100644
--- a/searchcore/src/vespa/searchcore/proton/metrics/documentdb_tagged_metrics.h
+++ b/searchcore/src/vespa/searchcore/proton/metrics/documentdb_tagged_metrics.h
@@ -123,6 +123,8 @@ struct DocumentDBTaggedMetrics : metrics::MetricSet
metrics::DoubleAverageMetric matchTime;
metrics::DoubleAverageMetric groupingTime;
metrics::DoubleAverageMetric rerankTime;
+ metrics::DoubleAverageMetric queryCollateralTime;
+ metrics::DoubleAverageMetric queryLatency;
DocIdPartitions partitions;
RankProfileMetrics(const vespalib::string &name,