diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2019-08-27 12:17:57 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2019-08-27 12:17:57 +0000 |
commit | 983e4069d088eca3a0f838936210ecf37b317b09 (patch) | |
tree | ecfb43400232377b4201f1c157e3a900cb3b67d4 /searchcore | |
parent | 9a7df507dd9807da1f05613a5367675750d6853f (diff) |
Initialize softdoom factor to correct proper initial value to avoid noise in graphs prior to receiving any queries.
Diffstat (limited to 'searchcore')
4 files changed, 3 insertions, 5 deletions
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; |