metrics icon indicating copy to clipboard operation
metrics copied to clipboard

Support serializing and deserializing `metrics_util::Summary`

Open seekstar opened this issue 1 year ago • 1 comments

I use metrics_util::Summary to measure quantiles of latencies. The latency files are too large, so I usually only save the calculated quantiles (0.1, 0.2, ..., 0.9, 0.99, 0.999, etc). However, the problem is that sometimes I want to know latencies at other quantiles (e.g., 0.91, 0.92, ..., 0.98), but the original latency files are not saved. This problem can be solved perfectly if metrics_util::Summary can be serialized and deserialized, so that I can save the metrics_util::Summary instead of large latency files.

seekstar avatar Nov 11 '23 07:11 seekstar

It seems like this should be technically possible: sketches-ddsketch supports implementing Serialize/Deserialize for DDSketch, gated behind a feature flag. We could do the same thing -- expose an optional feature flag -- which would in turn activate the feature flag in sketches-ddsketch.

Not sure when I'll be able to get to this, though.

tobz avatar Nov 12 '23 14:11 tobz