aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYngve Aasheim <yngveaasheim@users.noreply.github.com>2017-04-06 13:48:37 +0200
committerGitHub <noreply@github.com>2017-04-06 13:48:37 +0200
commit06caa70aa47c8c390b58193c46d504a32b8fabb7 (patch)
tree48b2c33877df00d12c4c5df61f11a352187457c3
parent5c414278edc5c75c1b93aa790518d288fa628a00 (diff)
parent00ae3912a5973b6c099df5dd45ed19235b70dc10 (diff)
Merge pull request #2121 from yahoo/bjormel/max-qps-per-second
VESPA-7023: Sample max QPS every second
-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);