apache / singa
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
i
pt
proto
in
cl
gitmodules
ini
cfg
clang-format
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.

main38916 LOC (40%) 185 files
test19432 LOC (20%) 72 files
generated0 LOC (0%) 0 files
build and deployment207 LOC (<1%) 9 files
other36706 LOC (38%) 404 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
i
proto
cl
in
cfg
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 185 files match defined criteria (38,916 LOC, 100.0% vs. main code):
    • 68 *.cc files (10,271 LOC)
    • 17 *.py files (8,414 LOC)
    • 69 *.h files (8,070 LOC)
    • 10 *.i files (3,772 LOC)
    • 1 *.hpp files (2,923 LOC)
    • 4 *.proto files (2,232 LOC)
    • 4 *.cl files (1,721 LOC)
    • 1 *.cu files (1,018 LOC)
    • 2 *.cmake files (189 LOC)
    • 3 *.in files (132 LOC)
    • 4 *.yaml files (118 LOC)
    • 1 *.rdf files (46 LOC)
    • 1 *.cfg files (10 LOC)
  • " *.cc" is biggest, containing 26.39% of LOC.
  • " *.cfg" is smallest, containing 0.03% of LOC.


*.cc10271 LOC (26%) 68 files
*.py8414 LOC (21%) 17 files
*.h8070 LOC (20%) 69 files
*.i3772 LOC (9%) 10 files
*.hpp2923 LOC (7%) 1 file
*.proto2232 LOC (5%) 4 files
*.cl1721 LOC (4%) 4 files
*.cu1018 LOC (2%) 1 file
*.cmake189 LOC (<1%) 2 files
*.in132 LOC (<1%) 3 files
*.yaml118 LOC (<1%) 4 files
*.rdf46 LOC (<1%) 1 file
*.cfg10 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 ".*/[Tt]est/.*".
    • files with paths like ".*/test[.].*".
    • files with paths like ".*/test_.*".
  • 72 files match defined criteria (19,432 LOC, 49.9% vs. main code):
    • 57 *.cc files (13,026 LOC)
    • 12 *.py files (6,339 LOC)
    • 2 *.java files (38 LOC)
    • 1 *.sh files (29 LOC)
  • " *.cc" is biggest, containing 67.03% of LOC.
  • " *.sh" is smallest, containing 0.15% of LOC.


*.cc13026 LOC (67%) 57 files
*.py6339 LOC (32%) 12 files
*.java38 LOC (<1%) 2 files
*.sh29 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 ".*/pom[.]xml".
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]gitmodules".
  • 9 files match defined criteria (207 LOC, 0.5% vs. main code):
    • 8 *.sh files (105 LOC)
    • 1 *.xml files (102 LOC)
  • " *.sh" is biggest, containing 50.72% of LOC.
  • " *.xml" is smallest, containing 49.28% of LOC.


*.sh105 LOC (50%) 8 files
*.xml102 LOC (49%) 1 file
Other Code
txt
pt
ini
proto
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[Dd]emos?/.*".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]ini".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
  • 404 files match defined criteria (36,706 LOC, 94.3% vs. main code):
    • 280 *.py files (27,632 LOC)
    • 15 *.txt files (2,850 LOC)
    • 43 *.md files (2,500 LOC)
    • 6 *.rs files (1,188 LOC)
    • 5 *.cc files (1,036 LOC)
    • 2 *.h files (372 LOC)
    • 6 *.sql files (316 LOC)
    • 10 *.rst files (232 LOC)
    • 24 *.sh files (186 LOC)
    • 3 *.json files (165 LOC)
    • 6 *.pt files (83 LOC)
    • 2 *.toml files (68 LOC)
    • 1 *.ini files (67 LOC)
    • 1 *.proto files (11 LOC)
  • " *.py" is biggest, containing 75.28% of LOC.
  • " *.proto" is smallest, containing 0.03% of LOC.


*.py27632 LOC (75%) 280 files
*.txt2850 LOC (7%) 15 files
*.md2500 LOC (6%) 43 files
*.rs1188 LOC (3%) 6 files
*.cc1036 LOC (2%) 5 files
*.h372 LOC (1%) 2 files
*.sql316 LOC (<1%) 6 files
*.rst232 LOC (<1%) 10 files
*.sh186 LOC (<1%) 24 files
*.json165 LOC (<1%) 3 files
*.pt83 LOC (<1%) 6 files
*.toml68 LOC (<1%) 2 files
*.ini67 LOC (<1%) 1 file
*.proto11 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-07 15:47