pytorch / audio
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
jsonl
patch
cmake
gitattributes
dockerignore
arpa
ini
cfg
in
clang-format
bib
gitmodules
clang-tidy
  • 33 extensions are included in analyses: py, cpp, h, json, md, txt, sh, rst, yml, bat, jsonl, yaml, gitignore, cuh, patch, cu, cc, cmake, css, gitattributes, dockerignore, arpa, html, svg, ini, cfg, in, clang-format, toml, bash, bib, gitmodules, clang-tidy
  • 5 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (41 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (24 files).
    • exclude files with path like ".*/(3rd|[Tt]hird)[-_]?[Pp]arty/.*" (Dependencies) (16 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).
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.

main21279 LOC (45%) 174 files
test12944 LOC (27%) 154 files
generated0 LOC (0%) 0 files
build and deployment480 LOC (1%) 12 files
other12312 LOC (26%) 141 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
cmake
cfg
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 174 files match defined criteria (21,279 lines of code, 100.0% vs. main code):
    • 77 *.py files (12,344 lines of code)
    • 41 *.cpp files (4,686 lines of code)
    • 41 *.h files (2,735 lines of code)
    • 4 *.cuh files (492 lines of code)
    • 2 *.cmake files (423 lines of code)
    • 3 *.cu files (263 lines of code)
    • 1 *.bash files (226 lines of code)
    • 3 *.yaml files (102 lines of code)
    • 1 *.toml files (6 lines of code)
    • 1 *.cfg files (2 lines of code)
  • " *.py" is biggest, containing 58.01% of code.
  • " *.cfg" is smallest, containing 0.01% of code.


*.py12344 LOC (58%) 77 files
*.cpp4686 LOC (22%) 41 files
*.h2735 LOC (12%) 41 files
*.cuh492 LOC (2%) 4 files
*.cmake423 LOC (1%) 2 files
*.cu263 LOC (1%) 3 files
*.bash226 LOC (1%) 1 files
*.yaml102 LOC (<1%) 3 files
*.toml6 LOC (<1%) 1 files
*.cfg2 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
jsonl
arpa
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/test_.*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*_test[.].*".
  • 154 files match defined criteria (12,944 lines of code, 60.8% vs. main code):
    • 147 *.py files (12,475 lines of code)
    • 5 *.jsonl files (404 lines of code)
    • 1 *.sh files (34 lines of code)
    • 1 *.arpa files (31 lines of code)
  • " *.py" is biggest, containing 96.38% of code.
  • " *.arpa" is smallest, containing 0.24% of code.


*.py12475 LOC (96%) 147 files
*.jsonl404 LOC (3%) 5 files
*.sh34 LOC (<1%) 1 files
*.arpa31 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 ".*[.]bat".
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitmodules".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]gitattributes".
  • 12 files match defined criteria (480 lines of code, 2.3% vs. main code):
    • 7 *.bat files (360 lines of code)
    • 5 *.sh files (120 lines of code)
  • " *.bat" is biggest, containing 75% of code.
  • " *.sh" is smallest, containing 25% of code.


*.bat360 LOC (75%) 7 files
*.sh120 LOC (25%) 5 files
Other Code
txt
ini
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 ".*[.]json".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*[.]svg".
    • files with paths like ".*[.]ini".
    • files with paths like ".*[.]patch".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*/[.]dockerignore".
  • 141 files match defined criteria (12,312 lines of code, 57.9% vs. main code):
    • 81 *.py files (8,151 lines of code)
    • 26 *.json files (2,280 lines of code)
    • 18 *.md files (1,336 lines of code)
    • 10 *.txt files (412 lines of code)
    • 3 *.cpp files (116 lines of code)
    • 1 *.sh files (12 lines of code)
    • 1 *.ini files (3 lines of code)
    • 1 *.rst files (2 lines of code)
  • " *.py" is biggest, containing 66.2% of code.
  • " *.rst" is smallest, containing 0.02% of code.


*.py8151 LOC (66%) 81 files
*.json2280 LOC (18%) 26 files
*.md1336 LOC (10%) 18 files
*.txt412 LOC (3%) 10 files
*.cpp116 LOC (<1%) 3 files
*.sh12 LOC (<1%) 1 files
*.ini3 LOC (<1%) 1 files
*.rst2 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.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
  • *.cuh 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
  • *.cu 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
  • *.bash files are analyzed with ShellAnalyzer:
    • 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
  • *.yaml files are analyzed with YamlAnalyzer:
    • 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
  • *.toml 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-04-15 01:09