pingcap/tidb
pingcap/tidb has 1,686,894 source lines of code out of 2,100,984 total lines across 5,172 files, counted with tokei from the master ref at commit 17da27f12131 on November 24, 2026. Tests, docs and generated files are excluded under OctoCounts' canonical public options.
pingcap/tidb: 1,686,894 code lines at commit 17da27f12131, counted with tokei-15.0.0 on 2026-11-24. Saved result 19cc981c9c96da0b6a686afc7b9965783e2d9c0c38c4d90e20fd8d1be1b57374.
Source: pingcap/tidb on GitHub · counted commit 17da27f12131
OctoCounts produced this report by resolving pingcap/tidb to commit 17da27f12131, 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.
Repository size insights
This is a very large codebase by counted code lines. Code represents 80.3% of all lines, comments represent 12.0%, and the repository averages 326 code lines per file. Go accounts for 81.9% of counted code.
| Language | Files | Lines | Code | Comments | Blanks |
|---|---|---|---|---|---|
| Go | 4188 | 1708319 | 1382135 | 174995 | 151189 |
| JSON | 177 | 219627 | 219502 | 0 | 125 |
| Bazel | 706 | 37915 | 36668 | 29 | 1218 |
| SQL | 9 | 20055 | 20053 | 0 | 2 |
| Happy | 2 | 19656 | 18743 | 0 | 913 |
| Jsonnet | 5 | 4546 | 4081 | 249 | 216 |
| TOML | 12 | 4647 | 3338 | 436 | 873 |
| Makefile | 2 | 970 | 769 | 42 | 159 |
| Shell | 19 | 1104 | 702 | 294 | 108 |
| YAML | 4 | 574 | 469 | 71 | 34 |
| Pan | 2 | 185 | 163 | 0 | 22 |
| SVG | 1 | 110 | 110 | 0 | 0 |
| Dockerfile | 3 | 109 | 59 | 31 | 19 |
| Protocol Buffers | 1 | 83 | 55 | 20 | 8 |
| BASH | 1 | 78 | 47 | 21 | 10 |
| Markdown | 36 | 2302 | 0 | 1559 | 743 |
| Plain Text | 4 | 80704 | 0 | 74827 | 5877 |
Top language: Go 81.9%. Generated on .
Counting rules and retention
pingcap/tidb: 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.
Reproduce this report
Report FAQ
How many lines of code does pingcap/tidb have?
pingcap/tidb has 1,686,894 lines of code, plus 252,574 comment lines and 161,516 blank lines, for 2,100,984 total lines at commit 17da27f12131 on November 24, 2026. Tests, docs and generated files are excluded under OctoCounts' canonical public options.
How was the pingcap/tidb line count measured?
OctoCounts resolved the public GitHub repository to commit 17da27f12131, downloaded the source archive, counted it with tokei, and cached the report by commit, tokei version, and analysis options.
What commit was counted for pingcap/tidb?
This OctoCounts report was generated from master at commit 17da27f12131 on November 24, 2026.
Play the growth animation for pingcap/tidb on this page — 1,686,894 code lines across 17 languages, counted by tokei.