GerritCodeReview / plugins_metrics-reporter-prometheus
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 15 units with 99 lines of code in units (41.2% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 0 medium size units (0 lines of code)
    • 3 small units (46 lines of code)
    • 12 very small units (53 lines of code)
0% | 0% | 0% | 46% | 53%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
java0% | 0% | 0% | 46% | 53%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/main/java/com/googlesource/gerrit/plugins/metricsreporterprometheus0% | 0% | 0% | 46% | 53%
Alternative Visuals
Longest Units
Top 15 longest units
Unit# linesMcCabe index# params
public GerritPrometheusExporter()
in src/main/java/com/googlesource/gerrit/plugins/metricsreporterprometheus/GerritPrometheusExporter.java
18 1 4
private static GerritVersionInfo extractVersionComponents()
in src/main/java/com/googlesource/gerrit/plugins/metricsreporterprometheus/GerritBuildInformationMetric.java
15 4 0
public boolean canViewMetrics()
in src/main/java/com/googlesource/gerrit/plugins/metricsreporterprometheus/CapabilityChecker.java
13 2 0
public void service()
in src/main/java/com/googlesource/gerrit/plugins/metricsreporterprometheus/GerritPrometheusExporter.java
10 3 2
private boolean canExportUsingPrometheusBearerToken()
in src/main/java/com/googlesource/gerrit/plugins/metricsreporterprometheus/GerritPrometheusExporter.java
9 2 1
protected void configure()
in src/main/java/com/googlesource/gerrit/plugins/metricsreporterprometheus/GerritPrometheusModule.java
5 1 0
public void compute()
in src/main/java/com/googlesource/gerrit/plugins/metricsreporterprometheus/GerritBuildInformationMetric.java
4 1 0
private static String getJavaVersion()
in src/main/java/com/googlesource/gerrit/plugins/metricsreporterprometheus/GerritBuildInformationMetric.java
4 1 0
protected void configureServlets()
in src/main/java/com/googlesource/gerrit/plugins/metricsreporterprometheus/GerritPrometheusHttpModule.java
3 1 0
public SortedMap getGauges()
in src/main/java/com/googlesource/gerrit/plugins/metricsreporterprometheus/FilteredMetricRegistry.java
3 1 0
public SortedMap getCounters()
in src/main/java/com/googlesource/gerrit/plugins/metricsreporterprometheus/FilteredMetricRegistry.java
3 1 0
public SortedMap getHistograms()
in src/main/java/com/googlesource/gerrit/plugins/metricsreporterprometheus/FilteredMetricRegistry.java
3 1 0
public SortedMap getTimers()
in src/main/java/com/googlesource/gerrit/plugins/metricsreporterprometheus/FilteredMetricRegistry.java
3 1 0
public SortedMap getMeters()
in src/main/java/com/googlesource/gerrit/plugins/metricsreporterprometheus/FilteredMetricRegistry.java
3 1 0
public String getDescription()
in src/main/java/com/googlesource/gerrit/plugins/metricsreporterprometheus/ViewMetricsCapability.java
3 1 0