zombocom / derailed_benchmarks

Go faster, off the Rails - Benchmarks for your whole Rails app
2.96k stars 141 forks source link

Guard, and fix single sha perf:library tests #153

Closed schneems closed 4 years ago

schneems commented 4 years ago

When using perf:library there was a bug that would result in the same sha being tested twice for instance if you ran:

$ SHAS_TO_TEST='schneems/keymaster-more-compat-correct' bundle exec derailed exec perf:library

Then it would incorrectly default to the same SHA. This PR fixes that behavior, it also detects this failure mode and raises an error if it happens somehow (perhaps the user accidentally puts it in twice somehow).

In addition there's a nice litte testing output that advertises which sha and description you're testing before you execute the tests:

Testing 1: fe60c15579: Preserve existing interfaces for smaller diff
Testing 2: 430579e40b: 1.8x Faster Partial Caching - Faster Cache Keys