MCPcopy Index your code
hub / github.com/OpenTSDB/opentsdb / addScannerStat

Method addScannerStat

src/stats/QueryStats.java:612–626  ·  view source on GitHub ↗

Adds a value for a specific scanner for a specific sub query. If it's a time then it must be in nanoseconds. @param query_index The index of the sub query @param id The numeric ID of the scanner @param name The name of the stat @param value The value to add to the map

(final int query_index, final int id, 
      final QueryStat name, final long value)

Source from the content-addressed store, hash-verified

610 * @param value The value to add to the map
611 */
612 public void addScannerStat(final int query_index, final int id,
613 final QueryStat name, final long value) {
614 Map<Integer, Map<QueryStat, Long>> qs = scanner_stats.get(query_index);
615 if (qs == null) {
616 qs = new ConcurrentHashMap<Integer, Map<QueryStat, Long>>(
617 Const.SALT_WIDTH() > 0 ? Const.SALT_BUCKETS() : 1);
618 scanner_stats.put(query_index, qs);
619 }
620 Map<QueryStat, Long> scanner_stat_map = qs.get(id);
621 if (scanner_stat_map == null) {
622 scanner_stat_map = new HashMap<QueryStat, Long>();
623 qs.put(id, scanner_stat_map);
624 }
625 scanner_stat_map.put(name, value);
626 }
627
628 /**
629 * Adds or overwrites the list of servers scanned by a scanner

Callers 2

closeMethod · 0.80
closeMethod · 0.80

Calls 4

SALT_WIDTHMethod · 0.95
SALT_BUCKETSMethod · 0.95
putMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected