# cockroachdb/cockroach SLOC report

> cockroachdb/cockroach: 3,085,053 code lines at commit 8812064a015d, counted with tokei-15.0.0 on 2026-11-09. Saved result 57da8c5fb01ea50f6302d5380b140494143b61c2b375d0e9287771b1d2c539d2.

cockroachdb/cockroach has 3,085,053 source lines of code out of 4,182,809 total lines across 12,785 files, counted with tokei from the 8812064a015d2faf99d3fc7e15880f94042954b0 ref at commit 8812064a015d on November 9, 2026. Tests, docs and generated files are excluded under OctoCounts' canonical public options.

OctoCounts produced this report by resolving cockroachdb/cockroach to commit 8812064a015d, downloading the repository source archive, and counting files selected by the effective rules with tokei, the open-source line counter written in Rust. The table below breaks the count down by programming language into files, total lines, code lines, comment lines, and blank lines, so the figures can be compared across languages and projects. Results are cached by commit, tokei version, and analysis options; an exact reproduction needs the same commit, engine version, and effective counting rules.

## Counting rules and retention

cockroachdb/cockroach: tokei-15.0.0, policy directories-v1; docs excluded, tests excluded, generated excluded. Excluded directory names: .cache, .generated, .git, .next, __tests__, build, dist, doc, docs, documentation, fixtures, gen, generated, node_modules, target, test, tests, vendor. Ignored languages: none. Repository declarations: off. Exclusions are rule-based; they do not prove that every test, document or generated file was removed.

Saved reports remain subject to cache cleanup and replacement. Export the JSON or text for durable citation; live repository URLs can change.

## Repository size insights

This is a very large codebase by counted code lines. Code represents 73.8% of all lines, comments represent 16.7%, and the repository averages 241 code lines per file. Go accounts for 84.1% of counted code.

| Language | Files | Lines | Code | Comments | Blanks |
| --- | ---: | ---: | ---: | ---: | ---: |
| Go | 8,907 | 3,471,666 | 2,593,330 | 544,487 | 333,849 |
| JSON | 201 | 123,345 | 123,334 | 0 | 11 |
| YAML | 108 | 108,855 | 102,615 | 3,114 | 3,126 |
| Bazel | 1,351 | 81,836 | 78,238 | 642 | 2,956 |
| TSX | 518 | 73,278 | 62,751 | 4,230 | 6,297 |
| TypeScript | 436 | 39,302 | 30,737 | 4,507 | 4,058 |
| Happy | 4 | 23,888 | 22,471 | 0 | 1,417 |
| Protocol Buffers | 175 | 38,634 | 15,558 | 18,238 | 4,838 |
| Sass | 194 | 14,540 | 11,456 | 1,052 | 2,032 |
| SQL | 90 | 9,744 | 9,039 | 558 | 147 |
| XML | 16 | 7,810 | 7,801 | 0 | 9 |
| Shell | 115 | 10,340 | 7,049 | 1,742 | 1,549 |
| TCL | 75 | 7,969 | 5,764 | 783 | 1,422 |
| Python | 16 | 2,927 | 2,036 | 456 | 435 |
| BASH | 22 | 2,395 | 1,905 | 221 | 269 |
| C | 3 | 2,586 | 1,898 | 482 | 206 |
| SVG | 87 | 1,681 | 1,675 | 4 | 2 |
| HCL | 6 | 1,871 | 1,537 | 51 | 283 |
| C++ | 3 | 1,672 | 1,422 | 55 | 195 |
| JavaScript | 22 | 1,462 | 962 | 335 | 165 |
| TOML | 3 | 600 | 580 | 9 | 11 |
| PlantUML | 1 | 780 | 578 | 0 | 202 |
| Java | 4 | 493 | 411 | 30 | 52 |
| C# | 1 | 434 | 393 | 10 | 31 |
| C Header | 4 | 1,186 | 292 | 814 | 80 |
| Vim Script | 4 | 292 | 263 | 8 | 21 |
| Templ | 4 | 234 | 212 | 8 | 14 |
| Dockerfile | 8 | 318 | 205 | 73 | 40 |
| FlatBuffers Schema | 4 | 594 | 184 | 310 | 100 |
| AWK | 4 | 248 | 143 | 76 | 29 |
| Makefile | 6 | 171 | 89 | 57 | 25 |
| HTML | 1 | 59 | 59 | 0 | 0 |
| PHP | 1 | 35 | 30 | 1 | 4 |
| Go HTML | 1 | 15 | 15 | 0 | 0 |
| MSBuild | 1 | 9 | 9 | 0 | 0 |
| Ruby | 1 | 8 | 6 | 0 | 2 |
| GNU Style Assembly | 1 | 10 | 4 | 4 | 2 |
| FORTRAN Legacy | 1 | 2 | 2 | 0 | 0 |
| Markdown | 90 | 14,671 | 0 | 10,642 | 4,029 |
| Plain Text | 296 | 136,849 | 0 | 105,671 | 31,178 |

Top language: Go 84.1%. Generated on November 9, 2026. Canonical report: https://octocounts.com/github/cockroachdb/cockroach/commit/8812064a015d2faf99d3fc7e15880f94042954b0?reportId=57da8c5fb01ea50f6302d5380b140494143b61c2b375d0e9287771b1d2c539d2&analysis=%7B%22profile%22%3A%22default%22%2C%22ignoredDirs%22%3A%5B%5D%2C%22includeDocs%22%3Afalse%2C%22includeTests%22%3Afalse%2C%22ignoredLanguages%22%3A%5B%5D%2C%22includeGenerated%22%3Afalse%7D

## Reproduce this report

[Reproduce this exact report and configuration](https://octocounts.com/github/cockroachdb/cockroach/commit/8812064a015d2faf99d3fc7e15880f94042954b0?reportId=57da8c5fb01ea50f6302d5380b140494143b61c2b375d0e9287771b1d2c539d2&analysis=%7B%22profile%22%3A%22default%22%2C%22ignoredDirs%22%3A%5B%5D%2C%22includeDocs%22%3Afalse%2C%22includeTests%22%3Afalse%2C%22ignoredLanguages%22%3A%5B%5D%2C%22includeGenerated%22%3Afalse%7D).

## Report FAQ

### How many lines of code does cockroachdb/cockroach have?

cockroachdb/cockroach has 3,085,053 lines of code, plus 698,670 comment lines and 399,086 blank lines, for 4,182,809 total lines at commit 8812064a015d on November 9, 2026. Tests, docs and generated files are excluded under OctoCounts' canonical public options.

### How was the cockroachdb/cockroach line count measured?

OctoCounts resolved the public GitHub repository to commit 8812064a015d, downloaded the source archive, counted it with tokei, and cached the report by commit, tokei version, and analysis options.

### What commit was counted for cockroachdb/cockroach?

This OctoCounts report was generated from 8812064a015d2faf99d3fc7e15880f94042954b0 at commit 8812064a015d on November 9, 2026.

## Similar repository reports

- [ptone/scion](https://octocounts.com/github/ptone/scion) — Go, 3,346,117 code lines
- [nwverse/persona](https://octocounts.com/github/nwverse/persona) — Go, 2,603,665 code lines
- [mattermost/mattermost](https://octocounts.com/github/mattermost/mattermost) — Go, 2,535,724 code lines
- [kubernetes/kubernetes](https://octocounts.com/github/kubernetes/kubernetes) — Go, 4,005,126 code lines
- [grafana/grafana](https://octocounts.com/github/grafana/grafana) — Go, 4,076,349 code lines
- [golang/go](https://octocounts.com/github/golang/go) — Go, 2,140,708 code lines

## Related OctoCounts pages

- [Recently analyzed repositories](https://octocounts.com/recent)
- [Popular SLOC reports](https://octocounts.com/popular)
- [Trending GitHub repositories](https://octocounts.com/trending)
- [Hall of Monoliths](https://octocounts.com/hall-of-monoliths)
- [CockroachDB vs YugabyteDB](https://octocounts.com/compare/cockroachdb-vs-yugabyte)
- [Rust vs Go](https://octocounts.com/compare/rust-vs-go)
- [Deno vs Node.js](https://octocounts.com/compare/deno-vs-node)
- [Kubernetes vs Terraform](https://octocounts.com/compare/kubernetes-vs-terraform)
- [How to count lines of code in a GitHub repository](https://octocounts.com/docs/count-lines-of-code-github)
- [GitHub SLOC counter guide](https://octocounts.com/docs/github-sloc-counter)
- [Counting methodology](https://octocounts.com/docs/methodology)
- [SLOC and code metrics glossary](https://octocounts.com/docs/glossary)
- [Original research: how filtering changes SLOC counts](https://octocounts.com/research)
- [OctoCounts API docs](https://octocounts.com/docs/api)
- [All OctoCounts guides](https://octocounts.com/docs)
