Search code examples
gerrit

How to find the time it took for a change to be merged in gerrit?


Is there any way to find the average time or time it takes for a change to be merged in Gerrit?


Solution

  • You can use REST API to get this info. If you use the Query Changes change endpoint you get the change info and compare the "created" info (The timestamp of when the change was created) and the "submitted" one (The timestamp of when the change was submitted).

    The following command gets the change info for CHANGE-NUMBER change:

    curl --user USER:PASS --request GET https://GERRIT-SERVER/a/changes/CHANGE-NUMBER