metrics
metrics copied to clipboard
Support serializing and deserializing `metrics_util::Summary`
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.
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.