Prometheus vs Grafana: source lines of code compared
As of 2026-08-14, prometheus/prometheus contains 530,016 total lines (442,716 code) across 1,415 files, while grafana/grafana contains 4,224,085 total lines (3,648,804 code) across 19,652 files as of 2026-08-14. grafana/grafana is about 8.2x the size of prometheus/prometheus by code lines. Code size is not code quality: a larger count only means more source material, not a better or worse project.
| Metric | prometheus/prometheus | grafana/grafana |
|---|
| Files | 1,415 | 19,652 |
| Total lines | 530,016 | 4,224,085 |
| Code lines | 442,716 | 3,648,804 |
| Comment lines | 44,921 | 218,910 |
| Blank lines | 42,379 | 356,371 |
| Languages counted | 12 | 12 |
Top languages in prometheus/prometheus: Go (67.1% of code), YAML (16.5% of code), JSON (6.2% of code). Top languages in grafana/grafana: JSON (34.8% of code), Go (30.5% of code), TypeScript (16.1% of code). Go, JSON, TSX, TypeScript appear in both top language lists; YAML appears only in prometheus/prometheus's top languages; SVG appears only in grafana/grafana's top languages.
Methodology: both counts come from cached OctoCounts reports generated with tokei. prometheus/prometheus was counted at ref main (commit 05f9eb8b3b8e) on 2026-08-14; grafana/grafana was counted at ref main (commit cdb406d29294) on 2026-08-14. See the counting methodology for ignored directories and analysis options.
Evidence and next steps:
Note: code size is not code quality. OctoCounts only reports reproducible line counts and makes no claim that either project is better.