# protocolbuffers/protobuf SLOC report

> protocolbuffers/protobuf: 911,426 code lines at commit 72c4274dd144, counted with tokei-15.0.0 on 2026-11-24. Saved result 61bdcd413ba37a4edabe6b578648321f288bbf1e314accfb1005676de4993f58.

Source: [protocolbuffers/protobuf on GitHub](https://github.com/protocolbuffers/protobuf) · counted commit [72c4274dd144](https://github.com/protocolbuffers/protobuf/tree/72c4274dd144d70713462d4364149787685b084b)

protocolbuffers/protobuf has 911,426 source lines of code out of 1,185,768 total lines across 2,962 files, counted with tokei from the main ref at commit 72c4274dd144 on November 24, 2026. Tests, docs and generated files are excluded under OctoCounts' canonical public options.

OctoCounts produced this report by resolving protocolbuffers/protobuf to commit 72c4274dd144, 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

protocolbuffers/protobuf: 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 large codebase by counted code lines. Code represents 76.9% of all lines, comments represent 12.6%, and the repository averages 308 code lines per file. C++ accounts for 30.3% of counted code.

| Language | Files | Lines | Code | Comments | Blanks |
| --- | ---: | ---: | ---: | ---: | ---: |
| C++ | 558 | 338,505 | 276,150 | 26,021 | 36,334 |
| C# | 224 | 193,108 | 162,118 | 16,979 | 14,011 |
| C Header | 633 | 220,992 | 152,525 | 42,308 | 26,159 |
| C | 143 | 99,959 | 76,000 | 12,426 | 11,533 |
| Objective-C | 85 | 71,744 | 57,515 | 6,136 | 8,093 |
| Java | 164 | 67,273 | 47,226 | 13,216 | 6,831 |
| Python | 99 | 45,443 | 36,784 | 2,931 | 5,728 |
| Bazel | 218 | 34,292 | 29,136 | 2,159 | 2,997 |
| Protocol Buffers | 299 | 35,199 | 23,221 | 6,680 | 5,298 |
| Bitbake | 17 | 16,674 | 14,796 | 485 | 1,393 |
| PHP | 136 | 23,564 | 11,606 | 9,566 | 2,392 |
| Rust | 85 | 11,450 | 8,730 | 1,198 | 1,522 |
| Ruby | 35 | 4,741 | 3,367 | 796 | 578 |
| CMake | 25 | 3,510 | 3,012 | 218 | 280 |
| JSON | 5 | 2,565 | 2,565 | 0 | 0 |
| Shell | 31 | 2,267 | 1,629 | 348 | 290 |
| XML | 26 | 1,357 | 1,285 | 16 | 56 |
| Lua | 2 | 901 | 703 | 77 | 121 |
| C++ Header | 6 | 1,028 | 687 | 123 | 218 |
| Swift | 3 | 645 | 511 | 59 | 75 |
| Go | 4 | 372 | 308 | 30 | 34 |
| Rakefile | 3 | 320 | 247 | 38 | 35 |
| Autoconf | 6 | 342 | 245 | 51 | 46 |
| Kotlin | 12 | 427 | 205 | 134 | 88 |
| MSBuild | 9 | 189 | 147 | 10 | 32 |
| TOML | 12 | 202 | 143 | 30 | 29 |
| Makefile | 2 | 120 | 93 | 1 | 26 |
| Dart | 2 | 114 | 90 | 7 | 17 |
| Emacs Lisp | 1 | 198 | 86 | 66 | 46 |
| Vim Script | 1 | 84 | 74 | 9 | 1 |
| Visual Studio Solution | 1 | 54 | 54 | 0 | 0 |
| Batch | 3 | 71 | 53 | 2 | 16 |
| YAML | 2 | 52 | 37 | 5 | 10 |
| AWK | 2 | 50 | 34 | 6 | 10 |
| Objective-C++ | 1 | 38 | 14 | 19 | 5 |
| PowerShell | 1 | 20 | 9 | 6 | 5 |
| M4 | 1 | 11 | 8 | 0 | 3 |
| NuGet Config | 1 | 8 | 7 | 1 | 0 |
| LD Script | 1 | 6 | 6 | 0 | 0 |
| Markdown | 44 | 3,717 | 0 | 2,767 | 950 |
| Plain Text | 59 | 4,156 | 0 | 3,979 | 177 |

Top language: C++ 30.3%. Generated on November 24, 2026. Canonical report: https://octocounts.com/github/protocolbuffers/protobuf/commit/72c4274dd144d70713462d4364149787685b084b?reportId=61bdcd413ba37a4edabe6b578648321f288bbf1e314accfb1005676de4993f58&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/protocolbuffers/protobuf/commit/72c4274dd144d70713462d4364149787685b084b?reportId=61bdcd413ba37a4edabe6b578648321f288bbf1e314accfb1005676de4993f58&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 protocolbuffers/protobuf have?

protocolbuffers/protobuf has 911,426 lines of code, plus 148,903 comment lines and 125,439 blank lines, for 1,185,768 total lines at commit 72c4274dd144 on November 24, 2026. Tests, docs and generated files are excluded under OctoCounts' canonical public options.

### How was the protocolbuffers/protobuf line count measured?

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

### What commit was counted for protocolbuffers/protobuf?

This OctoCounts report was generated from main at commit 72c4274dd144 on November 24, 2026.

## Similar repository reports

- [ggml-org/llama.cpp](https://octocounts.com/github/ggml-org/llama.cpp) — C++, 913,679 code lines
- [apache/trafficserver](https://octocounts.com/github/apache/trafficserver) — C++, 906,469 code lines
- [gem5/gem5](https://octocounts.com/github/gem5/gem5) — C++, 924,637 code lines
- [google/or-tools](https://octocounts.com/github/google/or-tools) — C++, 897,553 code lines
- [Kitware/ParaView](https://octocounts.com/github/Kitware/ParaView) — C++, 953,180 code lines
- [torment78/Elka.VoiceMeeterFxHost](https://octocounts.com/github/torment78/Elka.VoiceMeeterFxHost) — C++, 958,704 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)
- [Largest codebases by programming language](https://octocounts.com/languages)
- [Protocol Buffers vs FlatBuffers](https://octocounts.com/compare/protobuf-vs-flatbuffers)
- [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)
