diff options
author | Yngve Aasheim <yngveaasheim@users.noreply.github.com> | 2019-08-27 15:13:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-27 15:13:14 +0200 |
commit | d491d3ecc2c4676207219cc81ed353497940534c (patch) | |
tree | 68961a0fbfc59a312b4d4970e0347e3f1507c45e /searchcore | |
parent | 7e38aa32ca335145c5ffdb2b91ae7d83f0389dae (diff) | |
parent | 4346f595eb057bd6dcd01df20cf09dcfa5bd99d9 (diff) |
Merge pull request #10431 from vespa-engine/balder/properly-initialize-soft-doom-factor
Balder/properly initialize soft doom factor
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; |