# mongodb/mongo SLOC report

> mongodb/mongo: 7,575,175 code lines at commit 37eae97fd90a, counted with tokei-14.0.0 on 2026-10-21. Saved result e4a72c66f766bc2151ebaca8f66bdcd8a270ec6c7cd43014b2f56521ebe414d4.

mongodb/mongo has 7,575,175 source lines of code out of 10,514,373 total lines across 39,273 files, counted from the master ref at commit 37eae97fd90a by the OctoCounts tokei engine on 2026-10-21. The report is cached by commit, tokei version, and analysis options, so recounting the same revision returns exactly these numbers.

OctoCounts produced this report by resolving mongodb/mongo to commit 37eae97fd90a, 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 72.0% of all lines, comments represent 16.0%, and the repository averages 193 code lines per file. C++ accounts for 33.9% of counted code.

| Language | Files | Lines | Code | Comments | Blanks |
| --- | ---: | ---: | ---: | ---: | ---: |
| C++ | 7,874 | 3,385,997 | 2,568,072 | 338,150 | 479,775 |
| C++ Header | 9,830 | 2,183,443 | 1,623,209 | 293,947 | 266,287 |
| C Header | 6,983 | 1,868,619 | 1,162,639 | 481,064 | 224,916 |
| JavaScript | 8,287 | 1,400,755 | 1,053,679 | 198,640 | 148,436 |
| C | 871 | 786,202 | 583,350 | 134,994 | 67,858 |
| Python | 810 | 213,210 | 165,556 | 15,877 | 31,777 |
| Autoconf | 24 | 140,826 | 136,906 | 2,698 | 1,222 |
| Bazel | 1,213 | 113,125 | 99,538 | 3,973 | 9,614 |
| YAML | 1,667 | 84,740 | 69,999 | 9,989 | 4,752 |
| Bitbake | 16 | 37,247 | 37,104 | 14 | 129 |
| Shell | 377 | 23,978 | 16,784 | 3,581 | 3,613 |
| JSON | 184 | 16,567 | 16,566 | 0 | 1 |
| Visual Studio Project | 8 | 6,042 | 6,042 | 0 | 0 |
| GNU Style Assembly | 82 | 10,146 | 4,913 | 4,099 | 1,134 |
| TOML | 5 | 5,432 | 4,784 | 130 | 518 |
| Perl | 12 | 4,886 | 3,758 | 642 | 486 |
| RPM Specfile | 11 | 3,175 | 2,478 | 24 | 673 |
| Makefile | 23 | 3,733 | 2,456 | 547 | 730 |
| HTML | 4 | 2,649 | 2,397 | 26 | 226 |
| SWIG | 2 | 2,338 | 1,718 | 301 | 319 |
| CMake | 40 | 2,262 | 1,546 | 442 | 274 |
| Batch | 19 | 1,694 | 1,496 | 21 | 177 |
| Templ | 7 | 1,560 | 1,443 | 0 | 117 |
| Assembly | 18 | 2,572 | 1,442 | 825 | 305 |
| BASH | 6 | 1,805 | 1,257 | 321 | 227 |
| TypeScript | 34 | 3,640 | 910 | 2,263 | 467 |
| Protocol Buffers | 14 | 2,298 | 620 | 1,400 | 278 |
| ReStructuredText | 7 | 597 | 464 | 0 | 133 |
| Snakemake | 6 | 633 | 450 | 76 | 107 |
| CSS | 2 | 577 | 447 | 30 | 100 |
| Jupyter Notebooks | 3 | 542 | 403 | 43 | 96 |
| PowerShell | 7 | 550 | 376 | 94 | 80 |
| Dockerfile | 17 | 654 | 358 | 216 | 80 |
| Forge Config | 15 | 410 | 338 | 11 | 61 |
| D | 2 | 306 | 261 | 22 | 23 |
| TCL | 7 | 365 | 261 | 56 | 48 |
| Java | 1 | 268 | 192 | 46 | 30 |
| Pan | 1 | 172 | 131 | 23 | 18 |
| Rust | 7 | 187 | 128 | 29 | 30 |
| Scheme | 1 | 155 | 121 | 8 | 26 |
| LD Script | 6 | 85 | 85 | 0 | 0 |
| Visual Studio Solution | 2 | 80 | 80 | 0 | 0 |
| Lua | 2 | 86 | 69 | 3 | 14 |
| GDB Script | 2 | 67 | 51 | 12 | 4 |
| Prolog | 2 | 69 | 51 | 0 | 18 |
| Monkey C | 1 | 58 | 41 | 12 | 5 |
| Module-Definition | 3 | 40 | 38 | 0 | 2 |
| jq | 4 | 44 | 38 | 0 | 6 |
| CUDA | 1 | 72 | 36 | 21 | 15 |
| Swift | 1 | 36 | 27 | 7 | 2 |
| SVG | 1 | 26 | 26 | 0 | 0 |
| XML | 2 | 17 | 15 | 1 | 1 |
| R | 1 | 38 | 12 | 18 | 8 |
| INI | 6 | 6 | 6 | 0 | 0 |
| ReScript | 2 | 4 | 4 | 0 | 0 |
| Objective-C | 2 | 14 | 2 | 12 | 0 |
| Objective-C++ | 2 | 14 | 2 | 12 | 0 |
| Markdown | 327 | 95,604 | 0 | 83,762 | 11,842 |
| Plain Text | 409 | 103,656 | 0 | 99,645 | 4,011 |

Top language (C++ 33.9%). Generated at 2026-10-21T00:54:45.501628342Z. Canonical report: https://octocounts.com/github/mongodb/mongo/commit/37eae97fd90ae3fdfede42026972e4eae297faa3?reportId=e4a72c66f766bc2151ebaca8f66bdcd8a270ec6c7cd43014b2f56521ebe414d4&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/mongodb/mongo/commit/37eae97fd90ae3fdfede42026972e4eae297faa3?reportId=e4a72c66f766bc2151ebaca8f66bdcd8a270ec6c7cd43014b2f56521ebe414d4&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 mongodb/mongo have?

mongodb/mongo has 10,514,373 total lines, including 7,575,175 code lines, 1,678,127 comment lines, and 1,261,071 blank lines.

### How was the mongodb/mongo line count measured?

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

### What commit was counted for mongodb/mongo?

This OctoCounts report was generated from master at commit 37eae97fd90a on 2026-10-21T00:54:45.501628342Z.

## Similar repository reports

- [llvm/llvm-project](https://octocounts.com/github/llvm/llvm-project) — C++, 8,330,667 code lines
- [GaijinEntertainment/DagorEngine](https://octocounts.com/github/GaijinEntertainment/DagorEngine) — C++, 6,667,007 code lines
- [oceanbase/oceanbase](https://octocounts.com/github/oceanbase/oceanbase) — C++, 6,382,583 code lines
- [LibreOffice/core](https://octocounts.com/github/LibreOffice/core) — C++, 6,348,402 code lines
- [tensorflow/tensorflow](https://octocounts.com/github/tensorflow/tensorflow) — C++, 5,160,365 code lines
- [godotengine/godot](https://octocounts.com/github/godotengine/godot) — C++, 4,126,326 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)
- [TensorFlow vs PyTorch](https://octocounts.com/compare/tensorflow-vs-pytorch)
- [Electron vs Tauri](https://octocounts.com/compare/electron-vs-tauri)
- [Godot vs Bevy](https://octocounts.com/compare/godot-vs-bevy)
- [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)
