File Complexity Overall
  • There are 127 files with units, with 69,249 lines of code.
    • 0 very complex files (McCabe index sum 251+; 0 lines of code)
    • 15 complex files (McCabe index sum 126-250; 28,188 lines of code)
    • 25 medium complex files (McCabe index sum 51-125; 23,138 lines of code)
    • 17 slightly complex files (McCabe index sum 26-50; 6,389 lines of code)
    • 70 simple files (McCabe index sum 1-25; 11,534 lines of code)
  • 197 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 40% | 33% | 9% | 16%
Legend:
251+
126-250
51-125
26-50
1-25


explore: grouped by folders | grouped by complexity
File Complexity per Extension
251+
126-250
51-125
26-50
1-25
rs0% | 41% | 33% | 9% | 16%
py0% | 0% | 54% | 20% | 25%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
buffa-codegen0% | 51% | 30% | 7% | 10%
buffa0% | 37% | 39% | 10% | 13%
buffa-descriptor0% | 58% | 22% | 4% | 14%
buffa-types0% | 33% | 23% | 16% | 26%
protoc-gen-buffa0% | 100% | 0% | 0% | 0%
conformance0% | 75% | 0% | 0% | 24%
buffa-build0% | 0% | 100% | 0% | 0%
benchmarks0% | 0% | 42% | 15% | 41%
buffa-test0% | 0% | 52% | 0% | 47%
buffa-yaml0% | 0% | 0% | 100% | 0%
protoc-gen-buffa-packaging0% | 0% | 0% | 100% | 0%
buffa-remote-derive0% | 0% | 0% | 0% | 100%
fuzz0% | 0% | 0% | 0% | 100%
stress0% | 0% | 0% | 0% | 100%
scripts0% | 0% | 0% | 0% | 100%
Most Complex Files (Top 50)

The McCabe index of a file grows with its size: per 100 lines tells a large but plain file from a dense one, and most complex unit whether the complexity sits in one unit or is spread over many.

File# lines# unitsMcCabe index
(sum)
per 100
lines
most complex
unit
dynamic.rs
in buffa-descriptor/src/reflect
2398 114 225 9 17
pool.rs
in buffa-descriptor/src
2156 50 219 10 42
comments.rs
in buffa-codegen/src
1520 97 213 14 13
types.rs
in buffa/src
2485 158 210 8 7
lib.rs
in buffa-codegen/src
2809 37 188 7 21
extension.rs
in buffa/src
1593 149 182 11 4
message.rs
in buffa-codegen/src
2084 23 172 8 59
impl_message.rs
in buffa-codegen/src
2968 55 165 6 21
message.rs
in buffa/src
1818 126 157 9 7
any_ext.rs
in buffa-types/src
1379 85 154 11 7
json_helpers.rs
in buffa/src
1615 107 153 9 9
main.rs
in conformance/src
821 45 150 18 41
context.rs
in buffa-codegen/src
2314 111 146 6 10
main.rs
in protoc-gen-buffa/src
956 86 128 13 27
token.rs
in buffa/src/text
1272 58 126 10 18
decoder.rs
in buffa/src/text
1160 52 106 9 11
lib.rs
in buffa-build/src
1684 65 97 6 6
view.rs
in buffa-codegen/src
2496 28 90 4 13
buffered.rs
in buffa/src/json_helpers
591 65 77 13 3
encoding.rs
in buffa/src
1083 48 77 7 12
oneof.rs
in buffa-codegen/src
850 23 75 9 12
json.rs
in buffa-descriptor/src/reflect
789 37 74 9 14
field_names.rs
in buffa-codegen/src
613 21 72 12 13
generate.py
in benchmarks/charts
400 16 72 18 16
1268 49 70 6 4
protobuf.rs
in benchmarks/buffa/benches
721 30 70 10 9
extension.rs
in buffa-codegen/src
903 41 68 8 15
encode_sink.rs
in buffa/src
657 58 68 10 3
generate.py
in benchmarks/history
300 10 68 23 24
impl_text.rs
in buffa-codegen/src
956 28 67 7 13
containers.rs
in buffa-descriptor/src/reflect
393 44 63 16 6
feature_overrides.rs
in buffa-codegen/src
410 24 62 15 19
json_wkt.rs
in buffa-descriptor/src/reflect
570 22 60 11 9
timestamp_ext.rs
in buffa-types/src
503 49 58 12 4
view.rs
in buffa/src
3068 48 57 2 6
lazy_view.rs
in buffa-codegen/src
849 13 55 6 15
size_cache.rs
in buffa/src
572 33 54 9 4
map_codec.rs
in buffa/src
946 41 53 6 6
lib.rs
in buffa-test/src
904 52 52 6 1
duration_ext.rs
in buffa-types/src
452 44 51 11 6
encoder.rs
in buffa/src/text
595 25 49 8 5
reflect.rs
in benchmarks/buffa/benches
271 13 46 17 32
lib.rs
in buffa-yaml/src
448 38 44 10 2
parse_criterion.py
in benchmarks/history
153 7 43 28 12
type_registry.rs
in buffa/src
700 29 42 6 4
idents.rs
in buffa-codegen/src
278 21 41 15 5
cross_aggregate.py
in benchmarks/charts
107 3 41 38 31
enumeration.rs
in buffa/src
304 31 37 12 3
main.rs
in protoc-gen-buffa-packaging/src
366 22 36 10 6
lib.rs
in buffa/src
465 30 34 7 2
About This Analysis
  • File complexity is the sum of the McCabe indexes (conditional complexity) of the units (methods, functions...) in a file.
  • Files are classified in five categories based on that sum: 1-25 (simple files), 26-50 (slightly complex files), 51-125 (medium complex files), 126-250 (complex files), 251+ (very complex files). The default bands are five times the unit complexity bands, as a file is a group of units.
  • Only main code files with units are classified. Files without units (languages without unit analysis, or files without functions) have no complexity to measure and are left out rather than counted as simple.
  • A very complex file holds many decisions, which often means it has too many responsibilities: a candidate to split, and a place where changes need more testing.
Learn more...