summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2019-01-31 08:36:15 +0100
committerGitHub <noreply@github.com>2019-01-31 08:36:15 +0100
commit732bc6898196689766e8aa9e671efe38d73fd1a8 (patch)
tree1c138e1a9107f5fe32be831cc2dda235e8a2f13c
parent2bc272cfa07be3102f531ec08c15b012f8cc2abf (diff)
parent20c7a4e1e266736241969d9154d5985a2ba018b0 (diff)
Merge pull request #8301 from vespa-engine/balder/count-queries-soft-doomed
Balder/count queries soft doomed.
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/admin/monitoring/VespaMetricSet.java2
-rw-r--r--searchcore/src/vespa/searchcore/proton/metrics/documentdb_tagged_metrics.cpp6
-rw-r--r--searchcore/src/vespa/searchcore/proton/metrics/documentdb_tagged_metrics.h2
3 files changed, 9 insertions, 1 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/admin/monitoring/VespaMetricSet.java b/config-model/src/main/java/com/yahoo/vespa/model/admin/monitoring/VespaMetricSet.java
index 554b581ef8f..9a6f94dc43e 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/admin/monitoring/VespaMetricSet.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/admin/monitoring/VespaMetricSet.java
@@ -336,6 +336,7 @@ public class VespaMetricSet {
// matching
metrics.add(new Metric("content.proton.documentdb.matching.queries.rate"));
+ metrics.add(new Metric("content.proton.documentdb.matching.soft_doomed_queries.rate"));
metrics.add(new Metric("content.proton.documentdb.matching.query_latency.average"));
metrics.add(new Metric("content.proton.documentdb.matching.query_collateral_time.average"));
metrics.add(new Metric("content.proton.documentdb.matching.docs_matched.rate"));
@@ -345,6 +346,7 @@ public class VespaMetricSet {
metrics.add(new Metric("content.proton.documentdb.matching.rank_profile.rerank_time.average"));
metrics.add(new Metric("content.proton.documentdb.matching.rank_profile.docs_matched.rate"));
metrics.add(new Metric("content.proton.documentdb.matching.rank_profile.limited_queries.rate"));
+ metrics.add(new Metric("content.proton.documentdb.matching.rank_profile.soft_doomed_queries.rate"));
return metrics;
}
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 043d3b3314e..dcb68c15c0e 100644
--- a/searchcore/src/vespa/searchcore/proton/metrics/documentdb_tagged_metrics.cpp
+++ b/searchcore/src/vespa/searchcore/proton/metrics/documentdb_tagged_metrics.cpp
@@ -115,6 +115,7 @@ DocumentDBTaggedMetrics::MatchingMetrics::update(const MatchingStats &stats)
docsMatched.inc(stats.docsMatched());
docsRanked.inc(stats.docsRanked());
docsReRanked.inc(stats.docsReRanked());
+ softDoomedQueries.inc(stats.softDoomed());
softDoomFactor.set(stats.softDoomFactor());
queries.inc(stats.queries());
queryCollateralTime.addValueBatch(stats.queryCollateralTimeAvg(), stats.queryCollateralTimeCount(),
@@ -129,6 +130,7 @@ DocumentDBTaggedMetrics::MatchingMetrics::MatchingMetrics(MetricSet *parent)
docsRanked("docs_ranked", {}, "Number of documents ranked (first phase)", this),
docsReRanked("docs_reranked", {}, "Number of documents re-ranked (second phase)", this),
queries("queries", {}, "Number of queries executed", this),
+ softDoomedQueries("soft_doomed_queries", {}, "Number of queries hitting the soft timeout", this),
softDoomFactor("soft_doom_factor", {}, "Factor used to compute soft-timeout", this),
queryCollateralTime("query_collateral_time", {}, "Average time (sec) spent setting up and tearing down queries", this),
queryLatency("query_latency", {}, "Total average latency (sec) when matching and ranking a query", this)
@@ -146,6 +148,7 @@ DocumentDBTaggedMetrics::MatchingMetrics::RankProfileMetrics::RankProfileMetrics
docsReRanked("docs_reranked", {}, "Number of documents re-ranked (second phase)", this),
queries("queries", {}, "Number of queries executed", this),
limitedQueries("limited_queries", {}, "Number of queries limited in match phase", this),
+ softDoomedQueries("soft_doomed_queries", {}, "Number of queries hitting the soft timeout", this),
matchTime("match_time", {}, "Average time (sec) for matching a query (1st phase)", this),
groupingTime("grouping_time", {}, "Average time (sec) spent on grouping", this),
rerankTime("rerank_time", {}, "Average time (sec) spent on 2nd phase ranking", this),
@@ -154,7 +157,7 @@ DocumentDBTaggedMetrics::MatchingMetrics::RankProfileMetrics::RankProfileMetrics
{
for (size_t i = 0; i < numDocIdPartitions; ++i) {
vespalib::string partition(vespalib::make_string("docid_part%02ld", i));
- partitions.push_back(DocIdPartition::UP(new DocIdPartition(partition, this)));
+ partitions.push_back(std::make_unique<DocIdPartition>(partition, this));
}
}
@@ -191,6 +194,7 @@ DocumentDBTaggedMetrics::MatchingMetrics::RankProfileMetrics::update(const Match
docsReRanked.inc(stats.docsReRanked());
queries.inc(stats.queries());
limitedQueries.inc(stats.limited_queries());
+ softDoomedQueries.inc(stats.softDoomed());
matchTime.addValueBatch(stats.matchTimeAvg(), stats.matchTimeCount(),
stats.matchTimeMin(), stats.matchTimeMax());
groupingTime.addValueBatch(stats.groupingTimeAvg(), stats.groupingTimeCount(),
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 bfb954ecd25..29c29d642e7 100644
--- a/searchcore/src/vespa/searchcore/proton/metrics/documentdb_tagged_metrics.h
+++ b/searchcore/src/vespa/searchcore/proton/metrics/documentdb_tagged_metrics.h
@@ -114,6 +114,7 @@ struct DocumentDBTaggedMetrics : metrics::MetricSet
metrics::LongCountMetric docsRanked;
metrics::LongCountMetric docsReRanked;
metrics::LongCountMetric queries;
+ metrics::LongCountMetric softDoomedQueries;
metrics::DoubleValueMetric softDoomFactor;
metrics::DoubleAverageMetric queryCollateralTime;
metrics::DoubleAverageMetric queryLatency;
@@ -139,6 +140,7 @@ struct DocumentDBTaggedMetrics : metrics::MetricSet
metrics::LongCountMetric docsReRanked;
metrics::LongCountMetric queries;
metrics::LongCountMetric limitedQueries;
+ metrics::LongCountMetric softDoomedQueries;
metrics::DoubleAverageMetric matchTime;
metrics::DoubleAverageMetric groupingTime;
metrics::DoubleAverageMetric rerankTime;