The @PLUGIN@ allows a systematic collection of repository metrics.
The following exposed metric is available on request with the current status:
plugins_git_repo_metrics_numberOfProjects
The following exposed metrics are updated upon a ref-update
receive:
plugins_git_repo_metrics_numberofbitmaps_<repo_name> plugins_git_repo_metrics_numberoflooseobjects_<repo_name> plugins_git_repo_metrics_numberoflooserefs_<repo_name> plugins_git_repo_metrics_numberofpackedobjects_<repo_name> plugins_git_repo_metrics_numberofpackedrefs_<repo_name> plugins_git_repo_metrics_numberofpackfiles_<repo_name> plugins_git_repo_metrics_sizeoflooseobjects_<repo_name> plugins_git_repo_metrics_sizeofpackedobjects_<repo_name> plugins_git_repo_metrics_numberofkeepfiles_<repo_name> plugins_git_repo_metrics_numberoffiles_<repo_name> plugins_git_repo_metrics_numberofdirectories_<repo_name> plugins_git_repo_metrics_numberofemptydirectories_<repo_name> plugins_git_repo_metrics_combinedrefssha1_<repo_name>
The plugin allows to customize its behaviour through a specific git-repo-metrics.config
file in the $GERRIT_SITE/etc
directory.
The metrics are not collected for all the projects, otherwise there might be an explosion of metrics exported, but only the one listed in the configuration file, i.e.:
[git-repo-metrics] project = test-project project = another-repo gracePeriod = 5m
git-repo-metrics.forcedCollection: Force the repositories' metric collection update every gracePeriod interval. By default, disabled.
NOTE: When using
forcedCollection
thegracePeriod
should be defined to a positive interval, otherwise the collection would happen just once at the plugin startup time.
git-repo-metrics.gracePeriod: Grace period between samples collection. Used to avoid aggressive metrics collection. By default, 0.
git-repo-metrics.poolSize: Number of threads available to collect metrics. By default, 1.