- Go to the
benchmarks/directory. - Add a new subfolder.
- Add a CMakeLists.txt that compiles the files in the current folder.
- Add a
commands.lldbfile containing a list of lldb commands to run.
OR
- Copy
benchmarks/startuptobenchmarks/<YOUR-BENCH-NAME>. - Modify the
main.cppandcommands.lldbfor your needs.
You can use test-benchmark.sh to test your benchmark for functionality.
E.g. to test the print-str benchmark, just run bash test-benchmark.sh benchmarks/print-str/ from within the source directory.
A benchmark's runtime should be at most 30 seconds. This limit is set because each benchmark is run multiple times and we take the average of the measurements. We also measure timing, memory and flame graph stats in seperate runs to prevent them from influencing each other. So if youre benchmark takes just 30 seconds to run once, it could still potentially run for half an hour or so on the server.