apache / trafficserver
Source Code Overview

Analysis scope, overview of main, test, generated, deployment, build, and other code.

Source Code Analysis Scope
Files includes and excluded from analyses
po
txt
lua
in
cfg
clang-format
editorconfig
spec
natvis
proto
clang-tidy
i
vimrc
Overview of Analyzed Files
Basic stats on analyzed files
Intro
For analysis purposes we separate files in scope into several categories: main, test, generated, deployment and build, and other.

  • The main category contains all manually created source code files that are being used in the production.
  • Files in the main category are used as input for other analyses: logical decomposition, concerns, duplication, file size, unit size, and conditional complexity.
  • Test source code files are used only for testing of the product. These files are normally not deployed to production.
  • Build and deployment source code files are used to configure or support build and deployment process.
  • Generated source code files are automatically generated files that have not been manually changed after generation.
  • While a source code folder may contain a number of files, we are primarily interested in the source code files that are being written and maintained by developers.
  • Files containing binaries, documentation, or third-party libraries, for instance, are excluded from analysis. The exception are third-party libraries that have been changed by developers.

main338721 LOC (57%) 1,751 files
test102289 LOC (17%) 920 files
generated0 LOC (0%) 0 files
build and deployment1188 LOC (<1%) 22 files
other147824 LOC (25%) 1,356 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
in
lua
spec
i
natvis
cfg
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 1751 files match defined criteria (338,721 LOC, 100.0% vs. main code):
    • 761 *.cc files (235,905 LOC)
    • 818 *.h files (80,420 LOC)
    • 24 *.hpp files (4,735 LOC)
    • 36 *.cpp files (4,683 LOC)
    • 4 *.c files (3,261 LOC)
    • 14 *.in files (2,519 LOC)
    • 18 *.py files (2,445 LOC)
    • 34 *.cmake files (1,829 LOC)
    • 13 *.pl files (1,429 LOC)
    • 9 *.yaml files (821 LOC)
    • 13 *.lua files (341 LOC)
    • 1 *.spec files (160 LOC)
    • 1 *.i files (74 LOC)
    • 1 *.rdf files (48 LOC)
    • 1 *.natvis files (29 LOC)
    • 3 *.cfg files (22 LOC)
  • " *.cc" is biggest, containing 69.65% of LOC.
  • " *.cfg" is smallest, containing 0.01% of LOC.


*.cc235905 LOC (69%) 761 files
*.h80420 LOC (23%) 818 files
*.hpp4735 LOC (1%) 24 files
*.cpp4683 LOC (1%) 36 files
*.c3261 LOC (<1%) 4 files
*.in2519 LOC (<1%) 14 files
*.py2445 LOC (<1%) 18 files
*.cmake1829 LOC (<1%) 34 files
*.pl1429 LOC (<1%) 13 files
*.yaml821 LOC (<1%) 9 files
*.lua341 LOC (<1%) 13 files
*.spec160 LOC (<1%) 1 file
*.i74 LOC (<1%) 1 file
*.rdf48 LOC (<1%) 1 file
*.natvis29 LOC (<1%) 1 file
*.cfg22 LOC (<1%) 3 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
lua
cfg
in
proto
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*_tests[.].*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*[-]tests/.*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with paths like ".*/tests_.*".
    • files with paths like ".*/test[.].*".
  • 920 files match defined criteria (102,289 LOC, 30.2% vs. main code):
    • 200 *.cc files (36,625 LOC)
    • 408 *.py files (31,694 LOC)
    • 169 *.yaml files (15,775 LOC)
    • 14 *.cpp files (13,852 LOC)
    • 14 *.h files (1,153 LOC)
    • 40 *.sh files (755 LOC)
    • 31 *.lua files (602 LOC)
    • 4 *.c files (582 LOC)
    • 15 *.cfg files (523 LOC)
    • 2 *.pl files (334 LOC)
    • 2 *.java files (277 LOC)
    • 20 *.in files (87 LOC)
    • 1 *.proto files (30 LOC)
  • " *.cc" is biggest, containing 35.81% of LOC.
  • " *.proto" is smallest, containing 0.03% of LOC.


*.cc36625 LOC (35%) 200 files
*.py31694 LOC (30%) 408 files
*.yaml15775 LOC (15%) 169 files
*.cpp13852 LOC (13%) 14 files
*.h1153 LOC (1%) 14 files
*.sh755 LOC (<1%) 40 files
*.lua602 LOC (<1%) 31 files
*.c582 LOC (<1%) 4 files
*.cfg523 LOC (<1%) 15 files
*.pl334 LOC (<1%) 2 files
*.java277 LOC (<1%) 2 files
*.in87 LOC (<1%) 20 files
*.proto30 LOC (<1%) 1 file
Build and Deployment Code
Source code used to configure or support build and deployment process.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
  • 22 files match defined criteria (1,188 LOC, 0.4% vs. main code). All matches are in *.sh files.


*.sh1188 LOC (100%) 22 files
Other Code
po
txt
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*/[Dd]ocumentation/.*".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]po".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*/[Ee]xamples/.*".
  • 1356 files match defined criteria (147,824 LOC, 43.6% vs. main code):
    • 425 *.po files (57,725 LOC)
    • 602 *.rst files (55,726 LOC)
    • 50 *.json files (25,361 LOC)
    • 230 *.txt files (7,132 LOC)
    • 39 *.md files (1,595 LOC)
    • 3 *.cc files (149 LOC)
    • 1 *.rs files (54 LOC)
    • 5 *.yaml files (54 LOC)
    • 1 *.toml files (28 LOC)
  • " *.po" is biggest, containing 39.05% of LOC.
  • " *.toml" is smallest, containing 0.02% of LOC.


*.po57725 LOC (39%) 425 files
*.rst55726 LOC (37%) 602 files
*.json25361 LOC (17%) 50 files
*.txt7132 LOC (4%) 230 files
*.md1595 LOC (1%) 39 files
*.cc149 LOC (<1%) 3 files
*.rs54 LOC (<1%) 1 file
*.yaml54 LOC (<1%) 5 files
*.toml28 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-07 15:22