# cockroachdb/cockroach SLOC report

> As of 2026-08-26 (commit 8812064a015d), cockroachdb/cockroach contains 4,182,809 total lines: 3,085,053 code, 698,670 comments, 399,086 blank, across 12,785 files in 40 languages (top: Go 84.1%). Counted with tokei via OctoCounts.

OctoCounts produced this report by resolving cockroachdb/cockroach to commit 8812064a015d, downloading the repository source archive, and counting every source file 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, so counting the same revision again reproduces exactly these numbers.

## 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 |

Top language (Go 84.1%). Generated at 2026-08-26T18:21:07.227774235+00:00. Canonical report: https://octocounts.com/github/cockroachdb/cockroach

## Report FAQ

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

cockroachdb/cockroach has 4,182,809 total lines, including 3,085,053 code lines, 698,670 comment lines, and 399,086 blank lines.

### 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 master at commit 8812064a015d on 2026-08-26T18:21:07.227774235+00:00.

## Similar repository reports

- [kubernetes/kubernetes](https://octocounts.com/github/kubernetes/kubernetes) — Go, 3,852,226 code lines
- [mattermost/mattermost](https://octocounts.com/github/mattermost/mattermost) — Go, 2,063,616 code lines
- [golang/go](https://octocounts.com/github/golang/go) — Go, 2,054,516 code lines
- [sourcegraph/sourcegraph-public-snapshot](https://octocounts.com/github/sourcegraph/sourcegraph-public-snapshot) — Go, 1,949,533 code lines
- [milvus-io/milvus](https://octocounts.com/github/milvus-io/milvus) — Go, 1,536,635 code lines
- [infiniflow/ragflow](https://octocounts.com/github/infiniflow/ragflow) — Go, 1,167,592 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)
- [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)
- [GitHub SLOC counter guide](https://octocounts.com/docs/github-sloc-counter)
- [Counting methodology](https://octocounts.com/docs/methodology)
- [OctoCounts API docs](https://octocounts.com/docs/api)
