-
Notifications
You must be signed in to change notification settings - Fork 245
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix off-by-one for histogram bucket seams
See #488 for more details. With `exp2zero` histogram: * Go: ``` $ go run cmd/derp/main.go poc_metric_bucket{le="0"} 1 poc_metric_bucket{le="1"} 2 poc_metric_bucket{le="2"} 3 poc_metric_bucket{le="4"} 5 poc_metric_bucket{le="8"} 9 poc_metric_bucket{le="+Inf"} 9 poc_metric_sum 36 poc_metric_count 9 ``` * `ebpf_exporter`: ``` ebpf_exporter_poc_exp2zero_values_bucket{le="0"} 1 ebpf_exporter_poc_exp2zero_values_bucket{le="1"} 2 ebpf_exporter_poc_exp2zero_values_bucket{le="2"} 3 ebpf_exporter_poc_exp2zero_values_bucket{le="4"} 5 ebpf_exporter_poc_exp2zero_values_bucket{le="8"} 9 ebpf_exporter_poc_exp2zero_values_bucket{le="+Inf"} 9 ebpf_exporter_poc_exp2zero_values_sum 36 ebpf_exporter_poc_exp2zero_values_count 9 ``` With `exp2` histogram: * Go: ``` $ go run cmd/derp/main.go poc_metric_bucket{le="1"} 1 poc_metric_bucket{le="2"} 2 poc_metric_bucket{le="4"} 4 poc_metric_bucket{le="8"} 8 poc_metric_bucket{le="+Inf"} 8 poc_metric_sum 36 poc_metric_count 8 ``` * `ebpf_exporter` ``` ebpf_exporter_poc_exp2_values_bucket{le="1"} 1 ebpf_exporter_poc_exp2_values_bucket{le="2"} 2 ebpf_exporter_poc_exp2_values_bucket{le="4"} 4 ebpf_exporter_poc_exp2_values_bucket{le="8"} 8 ebpf_exporter_poc_exp2_values_bucket{le="+Inf"} 8 ebpf_exporter_poc_exp2_values_sum 36 ebpf_exporter_poc_exp2_values_count 8 ```
- Loading branch information
Showing
3 changed files
with
20 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters