public void writeMetrics(Map<String, Object> metricMap, long timeSearch) {
        double qps = timeSearch == 0 ? 0 : (1000d * totalQueries / timeSearch);
        metricMap.put("QPS", qps);
        metricMap.put("Time search", timeSearch);
        metricMap.put("Total hits", totalHits);
        metricMap.put("Total queries", totalQueries);
        metricMap.put("Max latency", latencyToString(maxLatency));
        metricMap.put("Min latency", latencyToString(minLatency));
        metricMap.put("99.9 percentile", latencyToString(percentile(0.999)));
        metricMap.put("99 percentile", latencyToString(percentile(0.99)));
        metricMap.put("90 percentile", latencyToString(percentile(0.90)));
        metricMap.put("75 percentile", latencyToString(percentile(0.75)));
        metricMap.put("50 percentile", latencyToString(percentile(0.50)));
    }
Various metrics stored during query execution

@author bjorncs
predicate-search/src/main/java/com/yahoo/search/predicate/benchmarks/ResultMetrics.java