| 18 | } |
| 19 | |
| 20 | void Histogram::increment(uint64_t val) { |
| 21 | unsigned slot = nextPow2(val); |
| 22 | if (counts.size() <= slot) { |
| 23 | counts.resize(slot + 1); |
| 24 | } |
| 25 | ++counts[slot]; |
| 26 | } |
| 27 | |
| 28 | std::vector<uint64_t> Histogram::getCounts() const { |
| 29 | return counts; |
no test coverage detected