summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYngve Aasheim <yngveaasheim@users.noreply.github.com>2019-08-27 15:13:14 +0200
committerGitHub <noreply@github.com>2019-08-27 15:13:14 +0200
commitd491d3ecc2c4676207219cc81ed353497940534c (patch)
tree68961a0fbfc59a312b4d4970e0347e3f1507c45e
parent7e38aa32ca335145c5ffdb2b91ae7d83f0389dae (diff)
parent4346f595eb057bd6dcd01df20cf09dcfa5bd99d9 (diff)
Merge pull request #10431 from vespa-engine/balder/properly-initialize-soft-doom-factor
Balder/properly initialize soft doom factor
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/admin/monitoring/VespaMetricSet.java4
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/matching_stats.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/matching_stats.h1
-rw-r--r--searchcore/src/vespa/searchcore/proton/metrics/documentdb_tagged_metrics.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/proton/metrics/documentdb_tagged_metrics.h1
5 files changed, 3 insertions, 9 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 970d03689ab..d12908eea25 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
@@ -413,10 +413,6 @@ 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.soft_doom_factor.min"));
- metrics.add(new Metric("content.proton.documentdb.matching.soft_doom_factor.max"));
- metrics.add(new Metric("content.proton.documentdb.matching.soft_doom_factor.sum"));
- metrics.add(new Metric("content.proton.documentdb.matching.soft_doom_factor.count"));
metrics.add(new Metric("content.proton.documentdb.matching.query_latency.max"));
metrics.add(new Metric("content.proton.documentdb.matching.query_latency.sum"));
metrics.add(new Metric("content.proton.documentdb.matching.query_latency.count"));
diff --git a/searchcore/src/vespa/searchcore/proton/matching/matching_stats.cpp b/searchcore/src/vespa/searchcore/proton/matching/matching_stats.cpp
index 3bdc8efaa1c..7280653c4f9 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/matching_stats.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/matching_stats.cpp
@@ -28,7 +28,7 @@ MatchingStats::MatchingStats()
_docsReRanked(0),
_softDoomed(0),
_doomOvertime(),
- _softDoomFactor(0.5),
+ _softDoomFactor(INITIAL_SOFT_DOOM_FACTOR),
_queryCollateralTime(),
_queryLatency(),
_matchTime(),
@@ -69,7 +69,6 @@ MatchingStats::add(const MatchingStats &rhs)
_softDoomed += rhs.softDoomed();
_doomOvertime.add(rhs._doomOvertime);
-
_queryCollateralTime.add(rhs._queryCollateralTime);
_queryLatency.add(rhs._queryLatency);
_matchTime.add(rhs._matchTime);
diff --git a/searchcore/src/vespa/searchcore/proton/matching/matching_stats.h b/searchcore/src/vespa/searchcore/proton/matching/matching_stats.h
index 0e1a9b2f791..a28c423eb7b 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/matching_stats.h
+++ b/searchcore/src/vespa/searchcore/proton/matching/matching_stats.h
@@ -133,6 +133,7 @@ private:
std::vector<Partition> _partitions;
public:
+ static constexpr double INITIAL_SOFT_DOOM_FACTOR = 0.5;
MatchingStats(const MatchingStats &) = delete;
MatchingStats & operator = (const MatchingStats &) = delete;
MatchingStats(MatchingStats &&) = default;
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 c8c53d6f795..f4b8203f8e2 100644
--- a/searchcore/src/vespa/searchcore/proton/metrics/documentdb_tagged_metrics.cpp
+++ b/searchcore/src/vespa/searchcore/proton/metrics/documentdb_tagged_metrics.cpp
@@ -116,7 +116,6 @@ DocumentDBTaggedMetrics::MatchingMetrics::update(const MatchingStats &stats)
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(),
stats.queryCollateralTimeMin(), stats.queryCollateralTimeMax());
@@ -131,7 +130,6 @@ DocumentDBTaggedMetrics::MatchingMetrics::MatchingMetrics(MetricSet *parent)
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)
{
@@ -156,6 +154,7 @@ DocumentDBTaggedMetrics::MatchingMetrics::RankProfileMetrics::RankProfileMetrics
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)
{
+ softDoomFactor.set(MatchingStats::INITIAL_SOFT_DOOM_FACTOR);
for (size_t i = 0; i < numDocIdPartitions; ++i) {
vespalib::string partition(vespalib::make_string("docid_part%02ld", i));
partitions.push_back(std::make_unique<DocIdPartition>(partition, this));
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 12aba210b17..01ba271a08f 100644
--- a/searchcore/src/vespa/searchcore/proton/metrics/documentdb_tagged_metrics.h
+++ b/searchcore/src/vespa/searchcore/proton/metrics/documentdb_tagged_metrics.h
@@ -115,7 +115,6 @@ struct DocumentDBTaggedMetrics : metrics::MetricSet
metrics::LongCountMetric docsReRanked;
metrics::LongCountMetric queries;
metrics::LongCountMetric softDoomedQueries;
- metrics::DoubleValueMetric softDoomFactor;
metrics::DoubleAverageMetric queryCollateralTime;
metrics::DoubleAverageMetric queryLatency;