39 BucketConfig(std::int64_t lowest_trackable_value, std::int64_t highest_trackable_value,
40 int significant_figures);
51 std::int64_t lowest_trackable_value;
52 std::int64_t highest_trackable_value;
53 std::int32_t significant_figures;
54 std::int32_t unit_magnitude;
55 std::int32_t sub_bucket_half_count_magnitude;
56 std::int32_t sub_bucket_count;
57 std::int32_t sub_bucket_half_count;
58 std::int64_t sub_bucket_mask;
59 std::int32_t bucket_count;
60 std::int32_t counts_len;
67 Histogram(std::int64_t lowest_trackable_value, std::int64_t highest_trackable_value,
68 std::int32_t significant_figures);
79 std::int64_t lowest_trackable_value() const noexcept {
return lowest_trackable_value_; }
84 std::int32_t
bucket_count() const noexcept {
return bucket_count_; }
85 std::int64_t
total_count() const noexcept {
return total_count_; }
86 std::int32_t
counts_len() const noexcept {
return static_cast<std::int32_t
>(counts_.size()); }
89 std::int64_t
min() const noexcept;
92 std::int64_t max() const noexcept;
101 bool values_are_equivalent(
std::int64_t a,
std::int64_t b) const noexcept;
110 std::int64_t lowest_equivalent_value(
std::int64_t value) const noexcept;
111 std::int64_t highest_equivalent_value(
std::int64_t value) const noexcept;
118 std::int64_t count_at_value(
std::int64_t value) const noexcept;
119 std::int64_t count_at_index(
std::int32_t index) const noexcept;
120 std::int64_t value_at_index(
std::int32_t index) const noexcept;
121 std::int64_t size_of_equivalent_value_range(
std::int64_t value) const noexcept;
122 std::int64_t next_non_equivalent_value(
std::int64_t value) const noexcept;
123 std::int64_t median_equivalent_value(
std::int64_t value) const noexcept;
124 std::int64_t counts_get_normalised(
std::int32_t index) const noexcept;
130 void reset() noexcept;
138 bool record_value(
std::int64_t value) noexcept;
147 bool record_values(
std::int64_t value,
std::int64_t count) noexcept;
150 std::int32_t normalize_index(
std::int32_t index) const noexcept;
151 std::int32_t get_bucket_index(
std::int64_t value) const noexcept;
152 std::int32_t counts_index(
std::int32_t bucket_index,
153 std::int32_t sub_bucket_index) const noexcept;
154 std::int32_t counts_index_for(
std::int64_t value) const noexcept;
155 std::int64_t non_zero_min() const noexcept;
157 void counts_inc_normalised(
std::int32_t index,
std::int64_t value) noexcept;
158 void update_min_max(
std::int64_t value) noexcept;
160 std::int64_t lowest_trackable_value_;
161 std::int64_t highest_trackable_value_;
162 std::int32_t significant_figures_;
163 std::int32_t unit_magnitude_;
164 std::int32_t sub_bucket_half_count_magnitude_;
165 std::int32_t sub_bucket_count_;
166 std::int32_t sub_bucket_half_count_;
167 std::int64_t sub_bucket_mask_;
168 std::int32_t bucket_count_;
170 std::int32_t normalizing_index_offset_;
171 std::int64_t min_value_;
172 std::int64_t max_value_;
173 std::int64_t total_count_;
174 std::vector<
std::int64_t> counts_;