Add measurement of PostReceive task
I think we should measure the task PostReceive in how long it takes to process many commits with open merge requests. Here is what I did in my local instance:
- Seed an account with a gitlab-ce repo
- Create a branch called
post-receive-test
starting at tagv8.9.0-rc1
. - Create a MR from
post-receive-test
tov8.9.0-rc8
- Run the script below via gitlab-rails console:
$ load '/home/stanhu/post-receive-test.rb'
RequestStore.begin!
project = Project.find_with_namespace('root/gitlab-ce')
oldrev = 'd2f423135b65b230c29359d8ac9994a3dd0d6214' # RC1
newrev = 'e8c70d49ee9c186a58a7ba8d29e8c98a6f540cb3' # RC8
ref = 'master'
user = User.find(1)
push_commits = project.repository.commits(newrev)
GitPushService.new(project, user, oldrev: oldrev, newrev: newrev, ref: 'refs/heads/post-receive-test').execute
In 8.10, this took around ~32 seconds on my instance.
In 8.11, this is closer to ~24 s or so.
/cc: @pcarranza