alibaba / PhotonLibOS
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
s
mdx
patch
in
i
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.

main57838 LOC (70%) 326 files
test19039 LOC (23%) 86 files
generated0 LOC (0%) 0 files
build and deployment0 LOC (0%) 0 files
other4674 LOC (5%) 66 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
i
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 326 files match defined criteria (57,838 LOC, 100.0% vs. main code):
    • 226 *.h files (35,525 LOC)
    • 73 *.cpp files (21,131 LOC)
    • 1 *.i files (414 LOC)
    • 5 *.js files (245 LOC)
    • 16 *.cmake files (239 LOC)
    • 2 *.py files (237 LOC)
    • 3 *.css files (47 LOC)
  • " *.h" is biggest, containing 61.42% of LOC.
  • " *.css" is smallest, containing 0.08% of LOC.


*.h35525 LOC (61%) 226 files
*.cpp21131 LOC (36%) 73 files
*.i414 LOC (<1%) 1 file
*.js245 LOC (<1%) 5 files
*.cmake239 LOC (<1%) 16 files
*.py237 LOC (<1%) 2 files
*.css47 LOC (<1%) 3 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
in
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*/test[.].*".
    • files with paths like ".*_test[.].*".
  • 86 files match defined criteria (19,039 LOC, 32.9% vs. main code):
    • 76 *.cpp files (16,700 LOC)
    • 2 *.asm files (1,589 LOC)
    • 1 *.in files (512 LOC)
    • 5 *.h files (157 LOC)
    • 1 *.hpp files (78 LOC)
    • 1 *.sh files (3 LOC)
  • " *.cpp" is biggest, containing 87.71% of LOC.
  • " *.sh" is smallest, containing 0.02% of LOC.


*.cpp16700 LOC (87%) 76 files
*.asm1589 LOC (8%) 2 files
*.in512 LOC (2%) 1 file
*.h157 LOC (<1%) 5 files
*.hpp78 LOC (<1%) 1 file
*.sh3 LOC (<1%) 1 file
Other Code
txt
patch
mdx
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]svg".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]mdx".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]patch".
  • 66 files match defined criteria (4,674 LOC, 8.1% vs. main code):
    • 21 *.md files (2,046 LOC)
    • 13 *.cpp files (1,248 LOC)
    • 17 *.txt files (713 LOC)
    • 10 *.json files (476 LOC)
    • 3 *.h files (127 LOC)
    • 1 *.patch files (57 LOC)
    • 1 *.mdx files (7 LOC)
  • " *.md" is biggest, containing 43.77% of LOC.
  • " *.mdx" is smallest, containing 0.15% of LOC.


*.md2046 LOC (43%) 21 files
*.cpp1248 LOC (26%) 13 files
*.txt713 LOC (15%) 17 files
*.json476 LOC (10%) 10 files
*.h127 LOC (2%) 3 files
*.patch57 LOC (1%) 1 file
*.mdx7 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-14 18:55