# protocolbuffers/protobuf SLOC report

> protocolbuffers/protobuf: 906,385 code lines at commit cf1e10c24b0f, counted with tokei-15.0.0 on 2026-11-16. Saved result ef950c9d3b69df8e1e5296ec87377a8b08beebe58c8180ca37f11f85fc468cc5.

protocolbuffers/protobuf has 906,385 source lines of code out of 1,180,100 total lines across 2,965 files, counted with tokei from the main ref at commit cf1e10c24b0f on November 16, 2026. Tests, docs and generated files are excluded under OctoCounts' canonical public options.

OctoCounts produced this report by resolving protocolbuffers/protobuf to commit cf1e10c24b0f, 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.8% of all lines, comments represent 12.6%, and the repository averages 306 code lines per file. C++ accounts for 30.2% of counted code.

| Language | Files | Lines | Code | Comments | Blanks |
| --- | ---: | ---: | ---: | ---: | ---: |
| C++ | 558 | 335,233 | 273,277 | 25,889 | 36,067 |
| C# | 224 | 192,675 | 161,738 | 16,959 | 13,978 |
| C Header | 633 | 220,671 | 152,286 | 42,255 | 26,130 |
| C | 143 | 99,033 | 75,198 | 12,375 | 11,460 |
| Objective-C | 85 | 71,606 | 57,418 | 6,120 | 8,068 |
| Java | 164 | 67,142 | 47,125 | 13,193 | 6,824 |
| Python | 100 | 45,299 | 36,623 | 2,937 | 5,739 |
| Bazel | 218 | 34,280 | 29,129 | 2,154 | 2,997 |
| Protocol Buffers | 301 | 35,050 | 23,040 | 6,713 | 5,297 |
| Bitbake | 17 | 16,695 | 14,727 | 563 | 1,405 |
| PHP | 136 | 23,562 | 11,604 | 9,566 | 2,392 |
| Rust | 85 | 11,342 | 8,646 | 1,196 | 1,500 |
| Ruby | 35 | 4,722 | 3,348 | 796 | 578 |
| CMake | 25 | 3,510 | 3,012 | 218 | 280 |
| JSON | 5 | 2,565 | 2,565 | 0 | 0 |
| Shell | 31 | 2,235 | 1,605 | 343 | 287 |
| 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 | 200 | 141 | 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.2%. Generated on November 16, 2026. Canonical report: https://octocounts.com/github/protocolbuffers/protobuf/commit/cf1e10c24b0f93df0e5c073fe49ae82c3740b7cf?reportId=ef950c9d3b69df8e1e5296ec87377a8b08beebe58c8180ca37f11f85fc468cc5&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/cf1e10c24b0f93df0e5c073fe49ae82c3740b7cf?reportId=ef950c9d3b69df8e1e5296ec87377a8b08beebe58c8180ca37f11f85fc468cc5&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 906,385 lines of code, plus 148,713 comment lines and 125,002 blank lines, for 1,180,100 total lines at commit cf1e10c24b0f on November 16, 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 cf1e10c24b0f, 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 cf1e10c24b0f on November 16, 2026.

## Similar repository reports

- [apache/trafficserver](https://octocounts.com/github/apache/trafficserver) — C++, 905,183 code lines
- [ggml-org/llama.cpp](https://octocounts.com/github/ggml-org/llama.cpp) — C++, 866,571 code lines
- [d99kris/nchat](https://octocounts.com/github/d99kris/nchat) — C++, 856,100 code lines
- [OpenRCT2/OpenRCT2](https://octocounts.com/github/OpenRCT2/OpenRCT2) — C++, 851,472 code lines
- [The-OpenROAD-Project/OpenROAD](https://octocounts.com/github/The-OpenROAD-Project/OpenROAD) — C++, 833,664 code lines
- [Edge0-AI/Edge0](https://octocounts.com/github/Edge0-AI/Edge0) — C++, 830,434 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)
- [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)
