GRPC Core  5.0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
histogram.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright 2015 gRPC authors.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
19 #ifndef GRPC_SUPPORT_HISTOGRAM_H
20 #define GRPC_SUPPORT_HISTOGRAM_H
21 
23 #include <stddef.h>
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
30 
31 GPRAPI gpr_histogram* gpr_histogram_create(double resolution,
32  double max_bucket_start);
34 GPRAPI void gpr_histogram_add(gpr_histogram* h, double x);
35 
40 
42  double percentile);
43 GPRAPI double gpr_histogram_mean(gpr_histogram* histogram);
44 GPRAPI double gpr_histogram_stddev(gpr_histogram* histogram);
46 GPRAPI double gpr_histogram_maximum(gpr_histogram* histogram);
47 GPRAPI double gpr_histogram_minimum(gpr_histogram* histogram);
48 GPRAPI double gpr_histogram_count(gpr_histogram* histogram);
49 GPRAPI double gpr_histogram_sum(gpr_histogram* histogram);
51 
52 GPRAPI const uint32_t* gpr_histogram_get_contents(gpr_histogram* histogram,
53  size_t* count);
55  const uint32_t* data,
56  size_t data_count, double min_seen,
57  double max_seen, double sum,
58  double sum_of_squares, double count);
59 
60 #ifdef __cplusplus
61 }
62 #endif
63 
64 #endif /* GRPC_SUPPORT_HISTOGRAM_H */
GPRAPI double gpr_histogram_variance(gpr_histogram *histogram)
GPRAPI double gpr_histogram_minimum(gpr_histogram *histogram)
GPRAPI double gpr_histogram_mean(gpr_histogram *histogram)
#define GPRAPI
Definition: port_platform.h:440
GPRAPI int gpr_histogram_merge(gpr_histogram *dst, const gpr_histogram *src)
The following merges the second histogram into the first.
GPRAPI double gpr_histogram_percentile(gpr_histogram *histogram, double percentile)
GPRAPI double gpr_histogram_stddev(gpr_histogram *histogram)
GPRAPI void gpr_histogram_add(gpr_histogram *h, double x)
GPRAPI double gpr_histogram_sum_of_squares(gpr_histogram *histogram)
GPRAPI gpr_histogram * gpr_histogram_create(double resolution, double max_bucket_start)
GPRAPI const uint32_t * gpr_histogram_get_contents(gpr_histogram *histogram, size_t *count)
struct gpr_histogram gpr_histogram
Definition: histogram.h:29
GPRAPI void gpr_histogram_merge_contents(gpr_histogram *histogram, const uint32_t *data, size_t data_count, double min_seen, double max_seen, double sum, double sum_of_squares, double count)
GPRAPI double gpr_histogram_sum(gpr_histogram *histogram)
GPRAPI double gpr_histogram_count(gpr_histogram *histogram)
GPRAPI double gpr_histogram_maximum(gpr_histogram *histogram)
GPRAPI void gpr_histogram_destroy(gpr_histogram *h)