summaryrefslogtreecommitdiffstats
path: root/container-search
diff options
context:
space:
mode:
authorBjorn Meland <bjormel@yahoo-inc.com>2017-03-31 15:37:12 +0200
committerBjorn Meland <bjormel@yahoo-inc.com>2017-03-31 15:37:12 +0200
commit00ae3912a5973b6c099df5dd45ed19235b70dc10 (patch)
treedcc25f59d07e5118b716bdfcc86da2680fd609f4 /container-search
parentffc5d1e3a06fe9b24053746c280854045e2667b7 (diff)
Sample max QPS every second
Diffstat (limited to 'container-search')
-rw-r--r--container-search/src/main/java/com/yahoo/prelude/statistics/StatisticsSearcher.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/container-search/src/main/java/com/yahoo/prelude/statistics/StatisticsSearcher.java b/container-search/src/main/java/com/yahoo/prelude/statistics/StatisticsSearcher.java
index eae3b436b6a..ac718c4867b 100644
--- a/container-search/src/main/java/com/yahoo/prelude/statistics/StatisticsSearcher.java
+++ b/container-search/src/main/java/com/yahoo/prelude/statistics/StatisticsSearcher.java
@@ -63,7 +63,7 @@ public class StatisticsSearcher extends Searcher {
private Value maxQueryLatency; // separate to avoid name mangling
@SuppressWarnings("unused") // all the work is done by the callback
private Value activeQueries; // raw measure every 5 minutes
- private Value peakQPS; // peak 10s QPS
+ private Value peakQPS; // peak 1s QPS
private Counter emptyResults; // number of results containing no concrete hits
private Value hitsPerQuery; // mean number of hits per query
private long prevMaxQPSTime; // previous measurement time of QPS
@@ -128,7 +128,7 @@ public class StatisticsSearcher extends Searcher {
// but two memory barriers in the common case. Don't change till we know
// that is actually better.
synchronized (peakQpsLock) {
- if ((now - prevMaxQPSTime) >= (10 * 1000)) {
+ if ((now - prevMaxQPSTime) >= (1000)) {
double ms = (double) (now - prevMaxQPSTime);
final double peakQPS = queriesForQPS / (ms / 1000);
this.peakQPS.put(peakQPS);