commit | f61b86264fe702ef39a3fcb7d789526ba6e5d165 | [log] [tgz] |
---|---|---|
author | Luca Milanesio <luca.milanesio@gmail.com> | Wed May 15 10:12:57 2024 +0100 |
committer | Luca Milanesio <luca.milanesio@gmail.com> | Wed May 15 10:53:10 2024 +0100 |
tree | b42e3c49e6f828bbf23ff857f85a4bfa6fe07b3a | |
parent | 42cd8b2b315adfb200eebfa95c89fed01282f4f1 [diff] |
Decouple the number of repositories metrics from the cache Do not associate directly the metric value and his callback to the Gerrit's project cache. A direct coupling has two issues: 1. Makes testing difficult (see the need of mocking the projects cache) 2. Generates unneeded workload of loading all Gerrit projects in cache This is a preparation for point 2. complete resolution where in a follow-up change the projects cache will be totally removed and replaced with a lighter mechanism. Change-Id: I1b27ed99bb13a12c3d3042b72187c716b21a457c
This plugin allows a systematic collection of repository metrics. Metrics are updated upon a ref-update
receive.
Clone or link this plugin to the plugins directory of Gerrit‘s source tree, and then run bazel build on the plugin’s directory.
Example:
git clone --recursive https://gerrit.googlesource.com/gerrit git clone https://gerrit.googlesource.com/plugins/git-repo-metrics pushd gerrit/plugins && ln -s ../../git-repo-metrics . && popd cd gerrit && bazel build plugins/git-repo-metrics
The output plugin jar is created in:
bazel-genfiles/plugins/git-repo-metrics/git-repo-metrics.jar
Copy the git-repo-metrics.jar into the Gerrit's /plugins directory and wait for the plugin to be automatically loaded.
More information about the plugin configuration can be found in the config.md file.