https://github.com/jmacd/otlp-expo-histo
https://github.com/jmacd/otlp-expo-histo
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jmacd/otlp-expo-histo
- Owner: jmacd
- Created: 2021-09-29T20:24:50.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-09-29T20:38:16.000Z (over 4 years ago)
- Last Synced: 2025-04-03T02:41:34.077Z (about 1 year ago)
- Language: Go
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OTEP 149 Base-2 Exponential Histogram prototypes
## Logarithm histogram mapper
The file `logarithm.go` demonstrates an implementation of the base-2
exponential histogram based on the built-in logarithm function.
## LookupTable histogram mapper
The file `lookuptable.go` demonstrates an implementation of the OTEP
base-2 exponential histogram based on a precomputed table of
constants.
### Generate a constants table
The constants table for the LookupTable histogram mapper is not
checked-in. The constants table can be used by any scale of histogram
less than or equal to the maximum scale computed. To generate a
constants table, run:
```
go run ./generate MAXSCALE
```
For some value of `MAXSCALE`. Note that the generated table will
contain 2**MAXSCALE entries, where `**` represents exponentiation
(i.e., two to the power of MAXSCALE). Practical limits start to apply
around `MAXSCALE=16`, where this program takes weeks of CPU time to run.
## Acknowledgements
[Yuke Zhuge](https://github.com/yzhuge) and [Otmar Ertl](https://github.com/oertl)
are the primary authors of these prototypes. See
[NrSketch](https://github.com/newrelic-experimental/newrelic-sketch-java/blob/1ce245713603d61ba3a4510f6df930a5479cd3f6/src/main/java/com/newrelic/nrsketch/indexer/LogIndexer.java)
and [DynaHist](https://github.com/dynatrace-oss/dynahist/blob/9a6003fd0f661a9ef9dfcced0b428a01e303805e/src/main/java/com/dynatrace/dynahist/layout/OpenTelemetryExponentialBucketsLayout.java) repositories
for more detail.