aliyun / coolbpf
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
txt
make
mod
s
spec
in
gitmodules
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.

main90630 LOC (94%) 430 files
test387 LOC (<1%) 13 files
generated0 LOC (0%) 0 files
build and deployment2635 LOC (2%) 44 files
other2617 LOC (2%) 70 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
spec
in
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 430 files match defined criteria (90,630 LOC, 100.0% vs. main code):
    • 102 *.c files (46,377 LOC)
    • 195 *.h files (33,364 LOC)
    • 72 *.py files (6,316 LOC)
    • 36 *.rs files (3,869 LOC)
    • 10 *.cmake files (241 LOC)
    • 2 *.go files (181 LOC)
    • 9 *.toml files (138 LOC)
    • 2 *.bash files (90 LOC)
    • 1 *.spec files (46 LOC)
    • 1 *.in files (8 LOC)
  • " *.c" is biggest, containing 51.17% of LOC.
  • " *.in" is smallest, containing 0.01% of LOC.


*.c46377 LOC (51%) 102 files
*.h33364 LOC (36%) 195 files
*.py6316 LOC (6%) 72 files
*.rs3869 LOC (4%) 36 files
*.cmake241 LOC (<1%) 10 files
*.go181 LOC (<1%) 2 files
*.toml138 LOC (<1%) 9 files
*.bash90 LOC (<1%) 2 files
*.spec46 LOC (<1%) 1 file
*.in8 LOC (<1%) 1 file
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/test_.*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*/test[.].*".
    • files with paths like ".*/[Tt]est/.*".
  • 13 files match defined criteria (387 LOC, 0.4% vs. main code):
    • 3 *.py files (153 LOC)
    • 1 *.rs files (123 LOC)
    • 7 *.c files (95 LOC)
    • 2 *.sh files (16 LOC)
  • " *.py" is biggest, containing 39.53% of LOC.
  • " *.sh" is smallest, containing 4.13% of LOC.


*.py153 LOC (39%) 3 files
*.rs123 LOC (31%) 1 file
*.c95 LOC (24%) 7 files
*.sh16 LOC (4%) 2 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
make
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]make".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]gitmodules".
  • 44 files match defined criteria (2,635 LOC, 2.9% vs. main code):
    • 40 *.sh files (2,536 LOC)
    • 4 *.make files (99 LOC)
  • " *.sh" is biggest, containing 96.24% of LOC.
  • " *.make" is smallest, containing 3.76% of LOC.


*.sh2536 LOC (96%) 40 files
*.make99 LOC (3%) 4 files
Other Code
txt
mod
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/go[.]mod".
  • 70 files match defined criteria (2,617 LOC, 2.9% vs. main code):
    • 16 *.md files (891 LOC)
    • 12 *.c files (629 LOC)
    • 35 *.txt files (538 LOC)
    • 1 *.svg files (496 LOC)
    • 2 *.rs files (31 LOC)
    • 2 *.mod files (11 LOC)
    • 1 *.h files (11 LOC)
    • 1 *.toml files (10 LOC)
  • " *.md" is biggest, containing 34.05% of LOC.
  • " *.toml" is smallest, containing 0.38% of LOC.


*.md891 LOC (34%) 16 files
*.c629 LOC (24%) 12 files
*.txt538 LOC (20%) 35 files
*.svg496 LOC (18%) 1 file
*.rs31 LOC (1%) 2 files
*.mod11 LOC (<1%) 2 files
*.h11 LOC (<1%) 1 file
*.toml10 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-15 05:14