Shopify / yjit-metrics

"Tasks for benchmarking, building and collecting stats for YJIT"
MIT License
14 stars 9 forks source link

Add event markers to "over time" graphs #271

Open rwstauner opened 4 months ago

rwstauner commented 4 months ago

There is a "YJIT Results Over Time" section at the bottom of the home page (and other "over time" graphs beyond that).

The activerecord graph changed significantly because the benchmark code itself changed.

We already have the "events.json", it would be nice if the over time graph included markers for these events that you could easily see if there is a known event that explains the graph change.

k0kubun commented 4 months ago

Besides maintaining and using events.json, another way to implement that would be to check the last modified git revision of the directory/file for each benchmark, and generate a marker when it's changed.

It probably takes some effort to maintain the list of events manually, and even random dependabot changes (which will likely not have manual event markers) may sometimes impact the performance, so I would like such automated markers.

rwstauner commented 4 months ago

Yeah that's a good point.

We could use something like git log --pretty=format:%H\ %at to get the commit hash and date modified for each benchmark. This would allow the markers to link to the commits.

We can probably start by just generating that data when we generate those graphs. If it's slow we could maybe split them up by year to cache it and add --since "$(date +%Y)-01-01" for the current one.

The hard part will be keeping the graphs usable. They are pretty crammed right now, you can only see axis markers for quarters. I wonder if we should make the "all time" graphs wider and maybe limit what we show on the front page to the last year.

maximecb commented 4 months ago

This is a good proposal and I agree that using the git log is probably the best solution for this 👍