# mongodb/mongo SLOC report

> mongodb/mongo: 7,617,918 code lines at commit d48ca0a141ad, counted with tokei-15.0.0 on 2026-11-05. Saved result 5bf553a68fb1285edd5962cc5cbb38a693b141349f3d1dea5d811b483a0b0f8f.

mongodb/mongo has 7,617,918 source lines of code out of 10,578,964 total lines across 39,522 files, counted with tokei from the master ref at commit d48ca0a141ad on November 5, 2026. Tests, docs and generated files are excluded under OctoCounts' canonical public options.

OctoCounts produced this report by resolving mongodb/mongo to commit d48ca0a141ad, 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

mongodb/mongo: 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 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,921 | 3,408,569 | 2,586,101 | 339,964 | 482,504 |
| C++ Header | 9,830 | 2,183,444 | 1,623,210 | 293,947 | 266,287 |
| C Header | 7,012 | 1,873,538 | 1,165,447 | 482,451 | 225,640 |
| JavaScript | 8,349 | 1,411,170 | 1,061,649 | 200,121 | 149,400 |
| C | 871 | 789,320 | 585,937 | 135,343 | 68,040 |
| Python | 836 | 222,890 | 174,154 | 16,119 | 32,617 |
| Autoconf | 24 | 140,897 | 136,962 | 2,713 | 1,222 |
| Bazel | 1,230 | 115,835 | 101,773 | 4,200 | 9,862 |
| YAML | 1,652 | 84,449 | 69,677 | 9,999 | 4,773 |
| Bitbake | 16 | 37,247 | 37,104 | 14 | 129 |
| Shell | 389 | 24,719 | 17,375 | 3,688 | 3,656 |
| JSON | 185 | 16,605 | 16,604 | 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,436 | 4,785 | 132 | 519 |
| Perl | 12 | 4,886 | 3,758 | 642 | 486 |
| RPM Specfile | 11 | 3,225 | 2,498 | 44 | 683 |
| 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,693 | 1,495 | 21 | 177 |
| Templ | 7 | 1,571 | 1,454 | 0 | 117 |
| Assembly | 18 | 2,572 | 1,442 | 825 | 305 |
| BASH | 6 | 1,803 | 1,257 | 319 | 227 |
| TypeScript | 34 | 3,640 | 910 | 2,263 | 467 |
| Protocol Buffers | 14 | 2,298 | 620 | 1,400 | 278 |
| PowerShell | 8 | 724 | 497 | 138 | 89 |
| 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 |
| 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 | 328 | 95,849 | 0 | 83,977 | 11,872 |
| Plain Text | 477 | 113,792 | 0 | 109,135 | 4,657 |

Top language: C++ 33.9%. Generated on November 5, 2026. Canonical report: https://octocounts.com/github/mongodb/mongo/commit/d48ca0a141adc807e22d47ee8cfd9e3d0ecb2bbb?reportId=5bf553a68fb1285edd5962cc5cbb38a693b141349f3d1dea5d811b483a0b0f8f&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/d48ca0a141adc807e22d47ee8cfd9e3d0ecb2bbb?reportId=5bf553a68fb1285edd5962cc5cbb38a693b141349f3d1dea5d811b483a0b0f8f&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 7,617,918 lines of code, plus 1,693,528 comment lines and 1,267,518 blank lines, for 10,578,964 total lines at commit d48ca0a141ad on November 5, 2026. Tests, docs and generated files are excluded under OctoCounts' canonical public options.

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

OctoCounts resolved the public GitHub repository to commit d48ca0a141ad, 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 d48ca0a141ad on November 5, 2026.

## Similar repository reports

- [luobochuanqi/llvm-project](https://octocounts.com/github/luobochuanqi/llvm-project) — C++, 7,466,206 code lines
- [llvm/llvm-project](https://octocounts.com/github/llvm/llvm-project) — C++, 8,396,601 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,352,232 code lines
- [tensorflow/tensorflow](https://octocounts.com/github/tensorflow/tensorflow) — C++, 5,244,806 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)
- [MongoDB vs PostgreSQL](https://octocounts.com/compare/mongodb-vs-postgres)
- [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)
- [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)
