LLDB nightly benchmarks and flamegraphs

Hi everyone,

I wanted to share a (hopefully useful) service for LLDB that I added recently:

If you go to https://teemperor.de/lldb-bench/ you'll now see graphs
that show the instruction count and memory usage of the last LLDB
nightlies (one per day). If you click on a graph you'll see a flame
graph that shows how much time we spent in each function when running
the benchmark. The graph should make it pretty obvious where the good
places for optimizations are.

You can see all graphs without the slide show under
https://teemperor.de/lldb-bench/static.html.

The source code of every benchmark can be found here:
GitHub - Teemperor/lldb-bench: lldb-benchmarks (until this code may or may not land in lldb) If you want to add a
benchmark, just make a PR to that repository and I'll merge it. See
the README of the repo for instructions.

I'll add more benchmarks in the future, but you are welcome to add your own.

Also, if you for some reason don't appreciate my amazing GNUplot
markup skills and prefer your own graphs, you can just grab the raw
benchmark data from here: https://teemperor.de/lldb-bench/data/ The
data format is just the time, git-commit and the
instruction-count/memoryInKB value (depending if it's a `.mem.dat` or
a `.inst.dat`).

On a side note: Today's spike in memory is related to changes in the
build setup, not a LLDB change. I don't expect too many of these
spikes to happen in the future because the benchmark framework is now
hopefully stable enough.

Cheers,

- Raphael

This is really cool. Maybe you could do it for all of LLVM too? It would be nice if, instead of cycling through each benchmark on a set interval, there were just a dropdown box where you could select the one you wanted to see.

+1, really nice. Any plans to add wall clock time? (I see you’re using perf, right?)

+1, really nice. Any plans to add wall clock time? (I see you're using perf, right?)

It's on my own VPS where I also run other things, so instruction count
is used for the long-term graph to prevent that other processes make
the graph jittery. But the daily flame graph is based on wall time.

This is really cool. Maybe you could do it for all of LLVM too? It would be nice if, instead of cycling through each benchmark on a set interval, there were just a dropdown box where you could select the one you wanted to see.

Covering LLVM and Clang is what I want to do next, but first I want to
rewrite it in something else than the current nightmarish mix of
python/bash/GNUplot. That probably also will feature a nicer web
interface.