Textplot DuckDB Extension
query.farm
query.farm
I created my own sparklines too with LISTAGG and unicode characters for rendering latency histograms, but the bigger problem there was that some latency buckets didn't have any data falling into them. That missing row of data still needs to be rendered as an empty bucket. So while the pure SQL approach worked, it was a convoluted query where I used an outer join with a list of synthetically generated latency buckets to align the rest of the buckets right.
That was a prototype anyway, later on I switched to returning the filled bucket numbers (latency:count) with LISTAGG as CSV that I later parsed and rendered in the app layer [3]
[1] https://duckdbsnippets.com/snippets/54/quick-inline-bar-char...
[2] https://duckdb.org/docs/stable/guides/data_viewers/youplot.h...
[3] https://tanelpoder.com/posts/xcapture-v3-alpha-ebpf-performa...