bazelbuild / rules_fuzzing
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 13 units with 180 lines of code in units (10.0% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 3 medium size units (78 lines of code)
    • 4 small units (54 lines of code)
    • 6 very small units (48 lines of code)
0% | 0% | 43% | 30% | 26%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 0% | 58% | 14% | 27%
cc0% | 0% | 29% | 44% | 26%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
fuzzing/tools0% | 0% | 58% | 14% | 27%
fuzzing/replay0% | 0% | 32% | 48% | 19%
fuzzing/engines0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 13 longest units
Unit# linesMcCabe index# params
def main()
in fuzzing/tools/launcher.py
29 6 1
absl::Status TraverseDirectory()
in fuzzing/replay/file_util.cc
28 6 2
def main()
in fuzzing/tools/make_corpus_dir.py
21 8 1
int main()
in fuzzing/replay/replay_main.cc
16 5 2
absl::Status YieldFiles()
in fuzzing/replay/file_util.cc
13 3 2
absl::Status SetFileContents()
in fuzzing/replay/file_util.cc
13 3 2
def validate_dict()
in fuzzing/tools/validate_dict.py
12 4 2
def main()
in fuzzing/tools/validate_dict.py
10 5 1
std::string StrErrorInternal()
in fuzzing/replay/status_util.cc
9 2 1
absl::Status ErrnoStatus()
in fuzzing/replay/status_util.cc
8 2 2
int main()
in fuzzing/engines/libfuzzer_stub.cc
8 1 2
def expand_corpus_to_file_list()
in fuzzing/tools/make_corpus_dir.py
7 3 2
def validate_line()
in fuzzing/tools/dict_validation.py
6 3 1