ci: avoid building from the same commit in parallel
[git.git] / t / perf / p1400-update-ref.sh
bloba75969cbb1571ba5da46438c94397ee2130b9be9
1 #!/bin/sh
3 test_description="Tests performance of update-ref"
5 . ./perf-lib.sh
7 test_perf_fresh_repo
9 test_expect_success "setup" '
10 test_commit PRE &&
11 test_commit POST &&
12 for i in $(test_seq 5000)
14 printf "start\ncreate refs/heads/%d PRE\ncommit\n" $i &&
15 printf "start\nupdate refs/heads/%d POST PRE\ncommit\n" $i &&
16 printf "start\ndelete refs/heads/%d POST\ncommit\n" $i || return 1
17 done >instructions
20 test_perf "update-ref" '
21 for i in $(test_seq 1000)
23 git update-ref refs/heads/branch PRE &&
24 git update-ref refs/heads/branch POST PRE &&
25 git update-ref -d refs/heads/branch || return 1
26 done
29 test_perf "update-ref --stdin" '
30 git update-ref --stdin <instructions >/dev/null
33 test_done