pytorch / glow
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
cmake
cl
pt
in
cfg
clang-format
proto
gitmodules
clang-tidy
  • 21 extensions are included in analyses: cpp, h, py, txt, md, sh, cmake, c, svg, cl, yaml, yml, gitignore, pt, json, in, cfg, clang-format, proto, gitmodules, clang-tidy
  • 6 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (16 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (38 files).
    • exclude files with path like ".*/git[-]history[.]txt" (Git history) (1 file).
    • exclude files with path like ".*/git[-][a-zA-Z0-9_]+[.]txt" (Git data exports for sokrates analyses) (0 files).
    • exclude files with path like ".*/(3rd|[Tt]hird)[-_]?[Pp]arty/.*" (Dependencies) (17 files).
    • exclude files with path like ".*[.]txt" (Text files) (81 files).
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.

main136259 LOC (62%) 445 files
test79926 LOC (36%) 335 files
generated0 LOC (0%) 0 files
build and deployment138 LOC (<1%) 9 files
other3192 LOC (1%) 26 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
cl
cmake
proto
cfg
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 445 files match defined criteria (136,259 lines of code, 100.0% vs. main code):
    • 197 *.cpp files (106,175 lines of code)
    • 199 *.h files (20,629 lines of code)
    • 28 *.py files (4,904 lines of code)
    • 4 *.cl files (2,387 lines of code)
    • 12 *.cmake files (892 lines of code)
    • 3 *.c files (818 lines of code)
    • 1 *.proto files (449 lines of code)
    • 1 *.cfg files (5 lines of code)
  • " *.cpp" is biggest, containing 77.92% of code.
  • " *.cfg" is smallest, containing 0% of code.


*.cpp106175 LOC (77%) 197 files
*.h20629 LOC (15%) 199 files
*.py4904 LOC (3%) 28 files
*.cl2387 LOC (1%) 4 files
*.cmake892 LOC (<1%) 12 files
*.c818 LOC (<1%) 3 files
*.proto449 LOC (<1%) 1 files
*.cfg5 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
cmake
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*_test[.].*".
  • 335 files match defined criteria (79,926 lines of code, 58.7% vs. main code):
    • 158 *.cpp files (70,457 lines of code)
    • 160 *.py files (8,596 lines of code)
    • 6 *.h files (654 lines of code)
    • 7 *.sh files (172 lines of code)
    • 3 *.yaml files (30 lines of code)
    • 1 *.cmake files (17 lines of code)
  • " *.cpp" is biggest, containing 88.15% of code.
  • " *.cmake" is smallest, containing 0.02% of code.


*.cpp70457 LOC (88%) 158 files
*.py8596 LOC (10%) 160 files
*.h654 LOC (<1%) 6 files
*.sh172 LOC (<1%) 7 files
*.yaml30 LOC (<1%) 3 files
*.cmake17 LOC (<1%) 1 files
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 ".*/[.]gitmodules".
    • files with paths like ".*/[.]gitignore".
  • 9 files match defined criteria (138 lines of code, 0.1% vs. main code). All matches are in *.sh files.


*.sh138 LOC (100%) 9 files
Other Code
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[Ee]xamples/.*".
  • 26 files match defined criteria (3,192 lines of code, 2.3% vs. main code):
    • 16 *.cpp files (2,654 lines of code)
    • 7 *.md files (421 lines of code)
    • 3 *.py files (117 lines of code)
  • " *.cpp" is biggest, containing 83.15% of code.
  • " *.py" is smallest, containing 3.67% of code.


*.cpp2654 LOC (83%) 16 files
*.md421 LOC (13%) 7 files
*.py117 LOC (3%) 3 files
Analyzers
Info about analyzers used for source code examinations.
  • *.cpp files are analyzed with CppAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • Advanced heuristic dependency analysis
  • *.h files are analyzed with CppAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • Advanced heuristic dependency analysis
  • *.py files are analyzed with PythonAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • Basic heuristic dependency analysis
  • *.cl files are analyzed with DefaultLanguageAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Basic code cleaning (empty lines removed for LOC calculations and duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.cmake files are analyzed with DefaultLanguageAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Basic code cleaning (empty lines removed for LOC calculations and duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.c files are analyzed with CStyleAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • No dependency analysis
  • *.proto files are analyzed with DefaultLanguageAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Basic code cleaning (empty lines removed for LOC calculations and duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.cfg files are analyzed with CfgAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis


2022-01-24 14:23