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)
| 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 |
no test coverage detected