Lines Matching refs:int64_t
57 static int64_t counts_get_direct(const struct hdr_histogram* h, int32_t index)
62 static int64_t counts_get_normalised(const struct hdr_histogram* h, int32_t index)
68 struct hdr_histogram* h, int32_t index, int64_t value)
76 struct hdr_histogram* h, int32_t index, int64_t value)
84 static void update_min_max(struct hdr_histogram* h, int64_t value)
90 static void update_min_max_atomic(struct hdr_histogram* h, int64_t value)
92 int64_t current_min_value;
93 int64_t current_max_value;
126 static int64_t power(int64_t base, int64_t exp)
128 int64_t result = 1;
144 static int32_t count_leading_zeros_64(int64_t value)
168 static int32_t get_bucket_index(const struct hdr_histogram* h, int64_t value)
174 static int32_t get_sub_bucket_index(int64_t value, int32_t bucket_index, int32_t unit_magnitude)
190 static int64_t value_from_index(int32_t bucket_index, int32_t sub_bucket_index, int32_t unit_magnitude)
192 return ((int64_t) sub_bucket_index) << (bucket_index + unit_magnitude);
195 int32_t counts_index_for(const struct hdr_histogram* h, int64_t value)
203 int64_t hdr_value_at_index(const struct hdr_histogram *h, int32_t index)
217 int64_t hdr_size_of_equivalent_value_range(const struct hdr_histogram* h, int64_t value)
225 static int64_t size_of_equivalent_value_range_given_bucket_indices(
234 static int64_t lowest_equivalent_value(const struct hdr_histogram* h, int64_t value)
241 static int64_t lowest_equivalent_value_given_bucket_indices(
249 int64_t hdr_next_non_equivalent_value(const struct hdr_histogram *h, int64_t value)
254 static int64_t highest_equivalent_value(const struct hdr_histogram* h, int64_t value)
259 int64_t hdr_median_equivalent_value(const struct hdr_histogram *h, int64_t value)
264 static int64_t non_zero_min(const struct hdr_histogram* h)
278 int64_t observed_total_count = 0;
283 int64_t count_at_index;
302 int64_t max_value = hdr_value_at_index(h, max_index);
318 static int32_t buckets_needed_to_cover_value(int64_t value, int32_t sub_bucket_count, int32_t unit_magnitude)
320 int64_t smallest_untrackable_value = ((int64_t) sub_bucket_count) << unit_magnitude;
344 int64_t lowest_discernible_value,
345 int64_t highest_trackable_value,
350 int64_t largest_value_with_single_unit_resolution;
376 cfg->sub_bucket_mask = ((int64_t) cfg->sub_bucket_count - 1) << cfg->unit_magnitude;
409 int64_t lowest_discernible_value,
410 int64_t highest_trackable_value,
414 int64_t* counts;
424 counts = (int64_t*) hdr_calloc((size_t) cfg.counts_len, sizeof(int64_t));
453 int hdr_alloc(int64_t highest_trackable_value, int significant_figures, struct hdr_histogram** result)
464 memset(h->counts, 0, (sizeof(int64_t) * h->counts_len));
469 return sizeof(struct hdr_histogram) + h->counts_len * sizeof(int64_t);
481 bool hdr_record_value(struct hdr_histogram* h, int64_t value)
486 bool hdr_record_value_atomic(struct hdr_histogram* h, int64_t value)
491 bool hdr_record_values(struct hdr_histogram* h, int64_t value, int64_t count)
513 bool hdr_record_values_atomic(struct hdr_histogram* h, int64_t value, int64_t count)
535 bool hdr_record_corrected_value(struct hdr_histogram* h, int64_t value, int64_t expected_interval)
540 bool hdr_record_corrected_value_atomic(struct hdr_histogram* h, int64_t value, int64_t expected_interval)
545 bool hdr_record_corrected_values(struct hdr_histogram* h, int64_t value, int64_t count, int64_t expected_interval)
547 int64_t missing_value;
571 bool hdr_record_corrected_values_atomic(struct hdr_histogram* h, int64_t value, int64_t count, int64_t expected_interval)
573 int64_t missing_value;
597 int64_t hdr_add(struct hdr_histogram* h, const struct hdr_histogram* from)
600 int64_t dropped = 0;
605 int64_t value = iter.value;
606 int64_t count = iter.count;
617 int64_t hdr_add_while_correcting_for_coordinated_omission(
618 struct hdr_histogram* h, struct hdr_histogram* from, int64_t expected_interval)
621 int64_t dropped = 0;
626 int64_t value = iter.value;
627 int64_t count = iter.count;
649 int64_t hdr_max(const struct hdr_histogram* h)
659 int64_t hdr_min(const struct hdr_histogram* h)
669 static int64_t get_value_from_idx_up_to_count(const struct hdr_histogram* h, int64_t count_at_percentile)
671 int64_t count_to_idx = 0;
687 int64_t hdr_value_at_percentile(const struct hdr_histogram* h, double percentile)
690 int64_t count_at_percentile =
691 (int64_t) (((requested_percentile / 100) * h->total_count) + 0.5);
692 int64_t value_from_idx = get_value_from_idx_up_to_count(h, count_at_percentile);
700 int hdr_value_at_percentiles(const struct hdr_histogram *h, const double *percentiles, int64_t *values, size_t length)
708 const int64_t total_count = h->total_count;
714 const int64_t count_at_percentile =
715 (int64_t) (((requested_percentile / 100) * total_count) + 0.5);
720 int64_t total = 0;
737 int64_t total = 0, count = 0;
738 int64_t total_count = h->total_count;
774 bool hdr_values_are_equivalent(const struct hdr_histogram* h, int64_t a, int64_t b)
779 int64_t hdr_lowest_equivalent_value(const struct hdr_histogram* h, int64_t value)
784 int64_t hdr_count_at_value(const struct hdr_histogram* h, int64_t value)
789 int64_t hdr_count_at_index(const struct hdr_histogram* h, int32_t index)
825 const int64_t value = hdr_value_at_index(iter->h, iter->counts_index);
828 const int64_t leq = lowest_equivalent_value_given_bucket_indices(iter->h, bucket_index, sub_bucket_index);
829 const int64_t size_of_equivalent_value_range = size_of_equivalent_value_range_given_bucket_indices(
839 static int64_t peek_next_value_from_index(struct hdr_iter* iter)
845 struct hdr_iter *iter, int64_t reporting_level_upper_bound)
867 static void update_iterated_values(struct hdr_iter* iter, int64_t new_value_iterated_to)
916 int64_t temp, half_distance, percentile_reporting_ticks;
947 temp = (int64_t)(log(100 / (100.0 - (percentiles->percentile_to_iterate_to))) / log(2)) + 1;
948 half_distance = (int64_t) pow(2, (double) temp);
1081 void hdr_iter_linear_init(struct hdr_iter* iter, const struct hdr_histogram* h, int64_t value_units_per_bucket)
1117 logarithmic->next_value_reporting_level *= (int64_t)logarithmic->log_base;
1139 int64_t value_units_first_bucket,
1198 int64_t total_count = iter.cumulative_count;