This repository has been archived by the owner on Jan 10, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The goal is to be able to put this data into a heatmap, to be able to calculate a quantile latency metric using prometheus functions, calculate average latency, and to be able to find the number of ops in certain buckets easily.
The server only returns the ops/s and the %'s in each bucket, so extrapolating the number of ops back into each bucket and converting it to a prometheus style histogram.
I haven't written anything in golang before, so please forgive me if this looks horrible.
aerospike_latency_hist_write_sum/aerospike_latency_hist_write_count
histogram_quantile(0.95,sum(aerospike_latency_read_bucket) by (le))
you can also find the estimated number of ops that exceeded a certain bucket value, rather than just the %.Note: for average latency purposes, this assumes the transactions <1ms are .5ms