commit | 42cd8b2b315adfb200eebfa95c89fed01282f4f1 | [log] [tgz] |
---|---|---|
author | Jose Granha <jose.granha@gmail.com> | Mon Mar 04 12:56:51 2024 +0000 |
committer | Jose Granha <jose.granha@gmail.com> | Sun Apr 07 12:13:54 2024 +0100 |
tree | 72f044c15bfa48d1c1206dc3fcfec5956d39c90a | |
parent | 5b481ff4d305457431a9744a3d08e9ed426ea153 [diff] |
Add numberofprojects metric Implement new metric plugins_git_repo_metrics_numberofprojects which captures the number of projects at collection moment. The plugin reload mode is changed to restart to allow for the new metric to reload, as due to the order of the events on the plugin reload mechanism, the previous version of the plugin is maintained until the last stage, which invalidates the re-creation of the metric. Bug: Issue 325029893 Change-Id: I86e8a1f7f35be650ebd6e24ad5ca92723fb89d3d
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.