Increments the cumulative value for a cumulative stat. If it's a time then it must be in nanoseconds @param query_index The index of the sub query @param name The name of the stat @param value The value to add to the existing value
(final int query_index, final QueryStat name,
final long value)
| 587 | * @param value The value to add to the existing value |
| 588 | */ |
| 589 | public void updateStat(final int query_index, final QueryStat name, |
| 590 | final long value) { |
| 591 | Map<QueryStat, Long> qs = query_stats.get(query_index); |
| 592 | long cum_time = value; |
| 593 | if (qs == null) { |
| 594 | qs = new HashMap<QueryStat, Long>(); |
| 595 | query_stats.put(query_index, qs); |
| 596 | } |
| 597 | |
| 598 | if (qs.containsKey(name)) { |
| 599 | cum_time += qs.get(name); |
| 600 | } |
| 601 | qs.put(name, cum_time); |
| 602 | } |
| 603 | |
| 604 | /** |
| 605 | * Adds a value for a specific scanner for a specific sub query. If it's a time |
no test coverage detected