|
|
static void | __spdk_histogram_increment (struct spdk_histogram_data *h, uint32_t range, uint32_t index) |
| |
|
static uint64_t | __spdk_histogram_get_count (const struct spdk_histogram_data *h, uint32_t range, uint32_t index) |
| |
|
static uint64_t * | __spdk_histogram_get_bucket (const struct spdk_histogram_data *h, uint32_t range, uint32_t index) |
| |
|
static void | spdk_histogram_data_reset (struct spdk_histogram_data *histogram) |
| |
|
static uint32_t | __spdk_histogram_data_get_bucket_range (struct spdk_histogram_data *h, uint64_t datapoint) |
| |
|
static uint32_t | __spdk_histogram_data_get_bucket_index (struct spdk_histogram_data *h, uint64_t datapoint, uint32_t range) |
| |
|
static void | spdk_histogram_data_tally (struct spdk_histogram_data *histogram, uint64_t datapoint) |
| |
|
static uint64_t | __spdk_histogram_data_get_bucket_start (const struct spdk_histogram_data *h, uint32_t range, uint32_t index) |
| |
|
static void | spdk_histogram_data_iterate (const struct spdk_histogram_data *histogram, spdk_histogram_data_fn fn, void *ctx) |
| |
|
static int | spdk_histogram_data_merge (const struct spdk_histogram_data *dst, const struct spdk_histogram_data *src) |
| |
| static struct spdk_histogram_data * | spdk_histogram_data_alloc_sized_ext (uint32_t granularity, uint64_t min_val, uint64_t max_val) |
| | Allocate a histogram data structure with specified granularity.
|
| |
|
static struct spdk_histogram_data * | spdk_histogram_data_alloc_sized (uint32_t granularity) |
| |
|
static struct spdk_histogram_data * | spdk_histogram_data_alloc (void) |
| |
|
static void | spdk_histogram_data_free (struct spdk_histogram_data *h) |
| |
|
static void | __spdk_histogram_get_borders_count_cb (void *_ctx, uint64_t start, uint64_t end, uint64_t count, uint64_t total, uint64_t so_far) |
| |
| static void | spdk_histogram_get_borders_count (struct spdk_histogram_data *h, struct spdk_histogram_borders *ctx) |
| | Dump histogram buckets for specified borders.
|
| |
| static struct spdk_histogram_borders * | spdk_histogram_get_borders_count_alloc_ctx (uint64_t *borders, size_t num_borders) |
| | Allocate a context to dump histogram buckets for specified borders.
|
| |
| static void | spdk_histogram_get_borders_count_free_ctx (struct spdk_histogram_borders *ctx) |
| | Free the context allocated by spdk_histogram_get_borders_count_alloc_ctx().
|
| |
Generic histogram library.
| static struct spdk_histogram_borders * spdk_histogram_get_borders_count_alloc_ctx |
( |
uint64_t * | borders, |
|
|
size_t | num_borders ) |
|
inlinestatic |
Allocate a context to dump histogram buckets for specified borders.
The borders array must be sorted in ascending order, each border represents a value which is an upper bound of a bucket. border_count will contain the count of all values that are less or equal to its border value. Reported border_count will contain one more element than the borders array, the last element will represent total count of all elements in the histogram.
- Parameters
-
| borders | An array of border values, must be sorted in ascending order. |
| num_borders | The number of borders in the borders array. |
- Returns
- A context to dump histogram buckets for specified borders.
+1 for bucket containing values from last border to +Inf