Histogram log2 counter (STAT_DIR_TYPE_HISTOGRAM_LOG2)
(self, stats)
| 533 | return StatsRingBuffer(stats, self.value) |
| 534 | |
| 535 | def histogram_log2(self, stats): |
| 536 | """Histogram log2 counter (STAT_DIR_TYPE_HISTOGRAM_LOG2)""" |
| 537 | # The value is a pointer to a vector of pointers (per-thread), each pointing to a vector of uint64_t bins |
| 538 | threads_ptr = self.value |
| 539 | thread_vec = StatsVector(stats, threads_ptr, "P") |
| 540 | all_bins = [] |
| 541 | min_exp = 0 |
| 542 | for thread_ptr_tuple in thread_vec: |
| 543 | bins_ptr = thread_ptr_tuple[0] |
| 544 | if bins_ptr: |
| 545 | bins_vec = StatsVector(stats, bins_ptr, "Q") |
| 546 | bins = [v[0] for v in bins_vec] |
| 547 | if bins: |
| 548 | min_exp = bins[0] |
| 549 | all_bins.append(bins[1:]) |
| 550 | else: |
| 551 | all_bins.append([]) |
| 552 | else: |
| 553 | all_bins.append([]) |
| 554 | return StatsHistogramLog2(all_bins, min_exp) |
| 555 | |
| 556 | def get_counter(self, stats): |
| 557 | """Return a list of counters""" |
nothing calls this directly
no test coverage detected