On Wed, Nov 04, 2020 at 03:57:22PM +0100, Patrick Steinhardt wrote: > In commit 0a0fbbe3ff (refs: remove lookup cache for > reference-transaction hook, 2020-08-25), a new benchmark was added to > p1400 which has the intention to exercise creation of multiple > transactions in a single process. As git-update-ref wasn't yet able to > create multiple transactions with a single run we instead used git-push. > As its non-atomic version creates a transaction per reference update, > this was the best approximation we could make at that point in time. > > Now that `git-update-ref --stdin` supports creation of multiple > transactions, let's convert the benchmark to use that instead. It has > less overhead and it's also a lot clearer what the actual intention is. Good direction. The diff confused me for a moment... > @@ -26,14 +27,7 @@ test_perf "update-ref" ' > ' > > test_perf "update-ref --stdin" ' > - git update-ref --stdin <update && > - git update-ref --stdin <delete && > - git update-ref --stdin <create > -' > - > -test_perf "nonatomic push" ' > - git push ./target-repo.git $(test_seq 1000) && > - git push --delete ./target-repo.git $(test_seq 1000) > + git update-ref --stdin <instructions >/dev/null > ' ...because we're dropping _two_ tests here. But I think they were testing the same thing, just with varying degrees of quality. It could possibly be useful to have perf results broken down by operation type (create vs delete vs update), but the original certainly didn't do that. And it's not clear to me it would actually produce interesting results; certainly not related to the hook, but possibly related to benchmarking ref updates in general. So I don't think it's worth worrying about. -Peff