facebookincubator / prometheus-configmanager
File Size

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

Intro
  • File size measurements show the distribution of size of files.
  • Files are classified in four categories based on their size (lines of code): 1-100 (very small files), 101-200 (small files), 201-500 (medium size files), 501-1000 (long files), 1001+(very long files).
  • It is a good practice to keep files small. Long files may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
File Size Overall
  • There are 39 files with 3,882 lines of code.
    • 0 very long files (0 lines of code)
    • 0 long files (0 lines of code)
    • 5 medium size files (1,438 lines of codeclsfd_ftr_w_mp_ins)
    • 10 small files (1,362 lines of code)
    • 24 very small files (1,082 lines of code)
0% | 0% | 37% | 35% | 27%
Legend:
1001+
501-1000
201-500
101-200
1-100


explore: zoomable circles | sunburst | 3D view
File Size per Extension
1001+
501-1000
201-500
101-200
1-100
go0% | 0% | 46% | 32% | 20%
js0% | 0% | 0% | 97% | 2%
yaml0% | 0% | 0% | 0% | 100%
yml0% | 0% | 0% | 0% | 100%
html0% | 0% | 0% | 0% | 100%
css0% | 0% | 0% | 0% | 100%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
alertmanager/handlers0% | 0% | 100% | 0% | 0%
alertmanager/client0% | 0% | 39% | 60% | 0%
prometheus/alert0% | 0% | 46% | 30% | 23%
prometheus/handlers0% | 0% | 100% | 0% | 0%
ui/src0% | 0% | 0% | 96% | 3%
alertmanager/config0% | 0% | 0% | 94% | 5%
helm/prometheus-configmanager0% | 0% | 0% | 0% | 100%
restrictor0% | 0% | 0% | 0% | 100%
fsclient/mocks0% | 0% | 0% | 0% | 100%
alertmanager/testcommon0% | 0% | 0% | 0% | 100%
prometheus0% | 0% | 0% | 0% | 100%
alertmanager0% | 0% | 0% | 0% | 100%
alertmanager/migration0% | 0% | 0% | 0% | 100%
default_configs0% | 0% | 0% | 0% | 100%
fsclient0% | 0% | 0% | 0% | 100%
ui/public0% | 0% | 0% | 0% | 100%
alertmanager/common0% | 0% | 0% | 0% | 100%
Longest Files (Top 39)
File# lines# units
client.go
in alertmanager/client
327 20
client.go
in prometheus/alert
325 19
handlers.go
in alertmanager/handlers
301 18
handlers.go
in prometheus/handlers
262 16
template_handlers.go
in alertmanager/handlers
223 13
AlertmanagerClient.go
in alertmanager/client/mocks
191 14
template_client.go
in alertmanager/client
186 18
receiver.go
in alertmanager/config
159 6
APIUtil.js
in ui/src
153 6
config.go
in alertmanager/config
134 10
TemplateClient.go
in alertmanager/client/mocks
125 10
alert_rule.go
in prometheus/alert
107 8
103 2
PrometheusAlertClient.go
in prometheus/alert/mocks
103 8
App.js
in ui/src
101 2
file_locker.go
in prometheus/alert
96 10
query_restrictor.go
in restrictor
84 8
values.yaml
in helm/prometheus-configmanager
75 -
FSClient.go
in fsclient/mocks
74 5
configs.go
in alertmanager/testcommon
70 -
prometheus-configurer.deployment.yaml
in helm/prometheus-configmanager/templates
65 -
DirectoryClient.go
in prometheus/alert/mocks
64 4
alertmanager-configurer.deployment.yaml
in helm/prometheus-configmanager/templates
62 -
server.go
in prometheus
58 1
alerts-ui.deployment.yaml
in helm/prometheus-configmanager/templates
56 -
server.go
in alertmanager
55 1
migration.go
in alertmanager/migration
55 2
alertmanager-configurer.service.yaml
in helm/prometheus-configmanager/templates
41 -
prometheus-configurer.service.yaml
in helm/prometheus-configmanager/templates
41 -
alerts-ui.service.yaml
in helm/prometheus-configmanager/templates
41 -
fsclient.go
in fsclient
35 6
alertmanager.yml
in default_configs
19 -
index.html
in ui/public
18 -
route.go
in alertmanager/config
18 -
prometheus.yml
in default_configs
16 -
config.go
in alertmanager/common
15 -
index.js
in ui/src
10 -
Chart.yaml
in helm/prometheus-configmanager
10 -
App.css
in ui/src
4 -
Files With Most Units (Top 23)
File# lines# units
client.go
in alertmanager/client
327 20
client.go
in prometheus/alert
325 19
template_client.go
in alertmanager/client
186 18
handlers.go
in alertmanager/handlers
301 18
handlers.go
in prometheus/handlers
262 16
AlertmanagerClient.go
in alertmanager/client/mocks
191 14
template_handlers.go
in alertmanager/handlers
223 13
config.go
in alertmanager/config
134 10
TemplateClient.go
in alertmanager/client/mocks
125 10
file_locker.go
in prometheus/alert
96 10
query_restrictor.go
in restrictor
84 8
alert_rule.go
in prometheus/alert
107 8
PrometheusAlertClient.go
in prometheus/alert/mocks
103 8
APIUtil.js
in ui/src
153 6
receiver.go
in alertmanager/config
159 6
fsclient.go
in fsclient
35 6
FSClient.go
in fsclient/mocks
74 5
DirectoryClient.go
in prometheus/alert/mocks
64 4
103 2
App.js
in ui/src
101 2
migration.go
in alertmanager/migration
55 2
server.go
in alertmanager
55 1
server.go
in prometheus
58 1
Files With Long Lines (Top 16)

There are 16 files with lines longer than 120 characters. In total, there are 53 long lines.

File# lines# units# long lines
template_handlers.go
in alertmanager/handlers
223 13 28
server.go
in alertmanager
55 1 5
query_restrictor.go
in restrictor
84 8 3
server.go
in prometheus
58 1 3
client.go
in alertmanager/client
327 20 2
handlers.go
in alertmanager/handlers
301 18 2
103 2 1
configs.go
in alertmanager/testcommon
70 - 1
migration.go
in alertmanager/migration
55 2 1
template_client.go
in alertmanager/client
186 18 1
PrometheusAlertClient.go
in prometheus/alert/mocks
103 8 1
client.go
in prometheus/alert
325 19 1
Chart.yaml
in helm/prometheus-configmanager
10 - 1
alertmanager-configurer.deployment.yaml
in helm/prometheus-configmanager/templates
62 - 1
prometheus-configurer.deployment.yaml
in helm/prometheus-configmanager/templates
65 - 1
alerts-ui.deployment.yaml
in helm/prometheus-configmanager/templates
56 - 1
Correlations

File Size vs. Commits (all time): 17 points

prometheus/alert/client.go x: 6 commits (all time) y: 325 lines of code prometheus/alert/mocks/PrometheusAlertClient.go x: 2 commits (all time) y: 103 lines of code alertmanager/config/config.go x: 3 commits (all time) y: 134 lines of code alertmanager/handlers/template_handlers.go x: 2 commits (all time) y: 223 lines of code alertmanager/handlers/handlers.go x: 2 commits (all time) y: 301 lines of code alertmanager/server.go x: 3 commits (all time) y: 55 lines of code prometheus/handlers/handlers.go x: 4 commits (all time) y: 262 lines of code prometheus/server.go x: 3 commits (all time) y: 58 lines of code alertmanager/client/client.go x: 2 commits (all time) y: 327 lines of code alertmanager/config/receiver.go x: 3 commits (all time) y: 159 lines of code default_configs/alertmanager.yml x: 1 commits (all time) y: 19 lines of code prometheus/alert/alert_rule.go x: 2 commits (all time) y: 107 lines of code restrictor/query_restrictor.go x: 1 commits (all time) y: 84 lines of code alertmanager/client/mocks/AlertmanagerClient.go x: 1 commits (all time) y: 191 lines of code alertmanager/client/template_client.go x: 1 commits (all time) y: 186 lines of code alertmanager/migration/migration.go x: 1 commits (all time) y: 55 lines of code alertmanager/testcommon/configs.go x: 1 commits (all time) y: 70 lines of code
327.0
lines of code
  min: 19.0
  average: 156.41
  25th percentile: 64.0
  median: 134.0
  75th percentile: 242.5
  max: 327.0
0 6.0
commits (all time)
min: 1.0 | average: 2.24 | 25th percentile: 1.0 | median: 2.0 | 75th percentile: 3.0 | max: 6.0

File Size vs. Contributors (all time): 17 points

prometheus/alert/client.go x: 2 contributors (all time) y: 325 lines of code prometheus/alert/mocks/PrometheusAlertClient.go x: 2 contributors (all time) y: 103 lines of code alertmanager/config/config.go x: 2 contributors (all time) y: 134 lines of code alertmanager/handlers/template_handlers.go x: 2 contributors (all time) y: 223 lines of code alertmanager/handlers/handlers.go x: 2 contributors (all time) y: 301 lines of code alertmanager/server.go x: 2 contributors (all time) y: 55 lines of code prometheus/handlers/handlers.go x: 2 contributors (all time) y: 262 lines of code prometheus/server.go x: 2 contributors (all time) y: 58 lines of code alertmanager/client/client.go x: 2 contributors (all time) y: 327 lines of code alertmanager/config/receiver.go x: 1 contributors (all time) y: 159 lines of code default_configs/alertmanager.yml x: 1 contributors (all time) y: 19 lines of code prometheus/alert/alert_rule.go x: 1 contributors (all time) y: 107 lines of code restrictor/query_restrictor.go x: 1 contributors (all time) y: 84 lines of code alertmanager/client/mocks/AlertmanagerClient.go x: 1 contributors (all time) y: 191 lines of code alertmanager/client/template_client.go x: 1 contributors (all time) y: 186 lines of code alertmanager/migration/migration.go x: 1 contributors (all time) y: 55 lines of code alertmanager/testcommon/configs.go x: 1 contributors (all time) y: 70 lines of code
327.0
lines of code
  min: 19.0
  average: 156.41
  25th percentile: 64.0
  median: 134.0
  75th percentile: 242.5
  max: 327.0
0 2.0
contributors (all time)
min: 1.0 | average: 1.53 | 25th percentile: 1.0 | median: 2.0 | 75th percentile: 2.0 | max: 2.0

File Size vs. Commits (30 days): 0 points

No data for "commits (30d)" vs. "lines of code".

File Size vs. Contributors (30 days): 0 points

No data for "contributors (30d)" vs. "lines of code".


File Size vs. Commits (90 days): 0 points

No data for "commits (90d)" vs. "lines of code".

File Size vs. Contributors (90 days): 0 points

No data for "contributors (90d)" vs. "lines of code".