quick-lint-js icon indicating copy to clipboard operation
quick-lint-js copied to clipboard

Run precise benchmarks on CI

Open strager opened this issue 5 years ago • 3 comments

We could run some precise benchmarks on CI. Examples:

  • Maximum memory usage (ASLR should be disabled)
  • Instruction count (ASLR should be disabled?)
  • Cycle count (ASLR should be disabled) (needs a CPU emulator)

Valgrind might help a lot.

Also, we need to store the collected data somewhere, and have some fancy dashboards to present the data.

strager avatar Oct 09 '20 03:10 strager

Memory usage:

Valgrind's memcheck tool provides some details, but not a high-water mark:

==14522== HEAP SUMMARY:
==14522==     in use at exit: 130,789 bytes in 182 blocks
==14522==   total heap usage: 791 allocs, 609 frees, 211,956 bytes allocated

Instruction count:

Valgrind can provide this information. I think we can run the Cachegrind tool and track its global statistics. We need to specify cache sizes and such; I think the default is inherited from the host, making the results non-portable. (But libc versions also play a factor in portability...)

Database:

We could use a Git repository as a database. GitHub Actions should be able to create a Git commit containing JSON files with the measurements. We could make a program which extracts data from this Git repository and generates charts. Hacky, but easy to implement and debug.

strager avatar Jan 15 '21 09:01 strager

Database:

I set up an SFTP/HTTPS server for builds: https://c.quick-lint-js.com/builds/ We could use this server to store benchmark results too. Probably easier to deal with than Git.

strager avatar Jan 20 '21 03:01 strager

Deno has some precise benchmarks which could inspire us: https://deno.land/benchmarks

strager avatar Dec 08 '21 09:12 strager