As of 2026-09-07 (commit 46014702c278), mongodb/mongo contains 10,421,016 total lines: 7,510,293 code, 1,659,930 comments, 1,250,793 blank, across 38,945 files in 59 languages (top: C++ 33.9%). Counted with tokei via OctoCounts.
OctoCounts produced this report by resolving mongodb/mongo to commit 46014702c278, 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.
This is a very large codebase by counted code lines. Code represents 72.1% of all lines, comments represent 15.9%, and the repository averages 193 code lines per file. C++ accounts for 33.9% of counted code.
| Language | Files | Lines | Code | Comments | Blanks |
|---|---|---|---|---|---|
| C++ | 7813 | 3354394 | 2545083 | 333859 | 475452 |
| C++ Header | 9830 | 2183443 | 1623209 | 293947 | 266287 |
| C Header | 6946 | 1860288 | 1158340 | 478325 | 223623 |
| JavaScript | 8159 | 1373119 | 1033391 | 193762 | 145966 |
| C | 878 | 789572 | 585706 | 135589 | 68277 |
| Python | 755 | 198118 | 152863 | 15214 | 30041 |
| Autoconf | 24 | 140870 | 136991 | 2650 | 1229 |
| Bazel | 1199 | 109034 | 96069 | 3636 | 9329 |
| YAML | 1638 | 82705 | 68074 | 9904 | 4727 |
| Bitbake | 16 | 37247 | 37104 | 14 | 129 |
| JSON | 184 | 16618 | 16617 | 0 | 1 |
| Shell | 367 | 22296 | 15521 | 3335 | 3440 |
Top language (C++ 33.9%). Generated at 2026-09-07T08:26:49.651714208+00:00.
mongodb/mongo has 10,421,016 total lines, including 7,510,293 code lines, 1,659,930 comment lines, and 1,250,793 blank lines.
OctoCounts resolved the public GitHub repository to commit 46014702c278, downloaded the source archive, counted it with tokei, and cached the report by commit, tokei version, and analysis options.
This OctoCounts report was generated from master at commit 46014702c278 on 2026-09-07T08:26:49.651714208+00:00.
Other public repositories with an OctoCounts report, ranked by top language and code size similarity: