diff options
| author | chenzizhan <[email protected]> | 2023-09-18 18:02:22 +0800 |
|---|---|---|
| committer | chenzizhan <[email protected]> | 2023-10-08 17:04:36 +0800 |
| commit | 018ec4d3dc315eb2a2418d038cb65deea1f725ed (patch) | |
| tree | 82f25baa9ca53f61908937bc978c83f653e4a3e8 | |
| parent | 9d452b417bbe330496347ad2c066d2541921ebd4 (diff) | |
change pythonapi symbol name
| -rw-r--r-- | src/metrics/python_api.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/metrics/python_api.c b/src/metrics/python_api.c index 83ad75c..c7c4c6d 100644 --- a/src/metrics/python_api.c +++ b/src/metrics/python_api.c @@ -8,7 +8,7 @@ #include "st_hyperloglog.h" // user must free the buf after use -void *histogram_base64_decode(char *buf) +void *fieldstat_histogram_base64_decode(char *buf) { size_t buffer_size = strlen(buf); struct hdr_histogram *hdr = histogram_decode_from_b64(buf, buffer_size); @@ -16,42 +16,42 @@ void *histogram_base64_decode(char *buf) return hdr; } -long long histogram_value_at_percentile(void* h, double percentile) +long long fieldstat_histogram_value_at_percentile(void* h, double percentile) { return hdr_value_at_percentile((const struct hdr_histogram *)h, percentile); } -long long histogram_count_le_value(void* h, long long value) +long long fieldstat_histogram_count_le_value(void* h, long long value) { return hdr_count_le_value((const struct hdr_histogram *)h, value); } -long long histogram_value_min(void* h) +long long fieldstat_histogram_value_min(void* h) { return hdr_min((const struct hdr_histogram *)h); } -long long histogram_value_max(void* h) +long long fieldstat_histogram_value_max(void* h) { return hdr_max((const struct hdr_histogram *)h); } -double histogram_value_mean(void* h) +double fieldstat_histogram_value_mean(void* h) { return hdr_mean((const struct hdr_histogram *)h); } -double histogram_value_stddev(void* h) +double fieldstat_histogram_value_stddev(void* h) { return hdr_stddev((const struct hdr_histogram *)h); } -long long histogram_value_total_count(void *h) +long long fieldstat_histogram_value_total_count(void *h) { return ((struct hdr_histogram *)h)->total_count; } -long long histogram_value_sum(void *h) +long long fieldstat_histogram_value_sum(void *h) { struct hdr_iter iter; long long sum = 0; @@ -63,7 +63,7 @@ long long histogram_value_sum(void *h) return sum; } -void histogram_free(void *h) +void fieldstat_histogram_free(void *h) { hdr_close((struct hdr_histogram *)h); } @@ -73,7 +73,7 @@ void histogram_free(void *h) /* hyperloglog */ /* -------------------------------------------------------------------------- */ void *hll_base64_decode(char *buf); -double hll_base64_to_count(char *buf) +double fieldstat_hll_base64_to_count(char *buf) { struct ST_hyperloglog *hll = hll_base64_decode(buf); double count = ST_hyperloglog_count(hll); @@ -118,13 +118,13 @@ void *hll_base64_decode(char *buf) return hll_from_blob; } -void hll_free(void *hll) +void fieldstat_hll_free(void *hll) { ST_hyperloglog_free((struct ST_hyperloglog *)hll); } // cppcheck-suppress [constParameterPointer, unmatchedSuppression] -bool is_hll(char *buf) +bool fieldstat_is_hll(char *buf) { size_t dec_size = 0; unsigned char *dec = b64_decode_ex(buf, 4, &dec_size); // 4: base64 convert every 3 bytes to 4 bytes |
