Hi Guilers,
I reach out here because I would like some help from the Guix community
to setup a continuous performance monitoring of Guile, using Guix.
The main idea is to build Guile with each new commit pushed to Codeberg,
run a series of programs with this new version of Guile and extract
various metrics from these programs.
For example, I often find myself modifying the compiler. I pay close
attention to the size of the emitted code on disk like so:
$ git checkout main
$ make
$ find stage2 -iname "*.go" -printf "%f %s\n" > then
$ git cherry-pick ...
$ make
$ find stage2 -iname "*.go" -printf "%f %s\n" > now
$ sdiff -s then now | awk '{ printf("%s\t%+d\n", $1, $5 - $2) }' | column -t
This gives me something like:
ice-9/boot-9.go +272
ice-9/i18n.go -72
ice-9/local-eval.go +160
...
There are other kinds of metrics which are interesting to have. For
example:
$ hyperfine --export-csv load-time.csv "guile -c '(use-modules (rnrs base))'"
> dev/null
Benchmark 1: guile -c '(use-modules (rnrs base))'
Time (mean ± σ): 9.6 ms ± 0.3 ms [User: 5.9 ms, System: 4.3 ms]
Range (min … max): 8.6 ms … 11.5 ms 241 runs
$ cat load-tim.csv
command,mean,stddev,median,user,system,min,max
guile -c '(use-modules (rnrs
base))',0.009666700473662545,0.00034979357393589316,0.009594730700000002,0.005276396707818929,0.004960339588477369,0.0088011947,0.0111349187
I think it would be nice to track these kind of metrics and expose them
through a web UI. I know that the Zig language does that [0]. What
would also be nice is for the maintainers of Guile to be notified about
potential performance regressions.
Would someone be interested for setting up such infractructure?
[0] https://ziglang.org/perf/
Thanks,
Olivier
--
Olivier Dion