pytorch / kineto
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
cu
tpp
cuh
gitmodules
  • 20 extensions are included in analyses: h, py, cpp, tsx, ts, md, json, txt, html, gitignore, js, sh, yml, cu, yaml, css, bzl, tpp, cuh, gitmodules
  • 6 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (7 files).
    • exclude files with path like ".*\.d\.ts" (Typescript definition files) (3 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (1 file).
    • 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 ".*[.]txt" (Text files) (2 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.

main17642 LOC (66%) 162 files
test2932 LOC (11%) 13 files
generated2214 LOC (8%) 3 files
build and deployment69 LOC (<1%) 4 files
other3649 LOC (13%) 14 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
tpp
cu
cuh
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 162 files match defined criteria (17,642 lines of code, 100.0% vs. main code):
    • 30 *.cpp files (5,814 lines of code)
    • 31 *.py files (4,302 lines of code)
    • 28 *.tsx files (3,137 lines of code)
    • 47 *.h files (2,752 lines of code)
    • 2 *.yaml files (992 lines of code)
    • 15 *.ts files (335 lines of code)
    • 2 *.html files (92 lines of code)
    • 1 *.tpp files (73 lines of code)
    • 1 *.bzl files (66 lines of code)
    • 1 *.cu files (47 lines of code)
    • 1 *.css files (11 lines of code)
    • 1 *.cuh files (11 lines of code)
    • 2 *.js files (10 lines of code)
  • " *.cpp" is biggest, containing 32.96% of code.
  • " *.js" is smallest, containing 0.06% of code.


*.cpp5814 LOC (32%) 30 files
*.py4302 LOC (24%) 31 files
*.tsx3137 LOC (17%) 28 files
*.h2752 LOC (15%) 47 files
*.yaml992 LOC (5%) 2 files
*.ts335 LOC (1%) 15 files
*.html92 LOC (<1%) 2 files
*.tpp73 LOC (<1%) 1 files
*.bzl66 LOC (<1%) 1 files
*.cu47 LOC (<1%) 1 files
*.css11 LOC (<1%) 1 files
*.cuh11 LOC (<1%) 1 files
*.js10 LOC (<1%) 2 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
cu
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/test_.*".
  • 13 files match defined criteria (2,932 lines of code, 16.6% vs. main code):
    • 4 *.py files (1,350 lines of code)
    • 7 *.cpp files (1,281 lines of code)
    • 1 *.cu files (252 lines of code)
    • 1 *.h files (49 lines of code)
  • " *.py" is biggest, containing 46.04% of code.
  • " *.h" is smallest, containing 1.67% of code.


*.py1350 LOC (46%) 4 files
*.cpp1281 LOC (43%) 7 files
*.cu252 LOC (8%) 1 files
*.h49 LOC (1%) 1 files
Generated Code
Automatically generated files, not manually changed after generation.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/generated/.*".
  • 3 files match defined criteria (2,214 lines of code, 12.5% vs. main code). All matches are in *.ts files.


*.ts2214 LOC (100%) 3 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 ".*([.]|/)webpack([.]|/).*".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/[.]gitmodules".
  • 4 files match defined criteria (69 lines of code, 0.4% vs. main code):
    • 3 *.sh files (38 lines of code)
    • 1 *.js files (31 lines of code)
  • " *.sh" is biggest, containing 55.07% of code.
  • " *.js" is smallest, containing 44.93% of code.


*.sh38 LOC (55%) 3 files
*.js31 LOC (44%) 1 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 ".*[.]json".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[Ee]xamples/.*".
  • 14 files match defined criteria (3,649 lines of code, 20.7% vs. main code):
    • 4 *.json files (3,024 lines of code)
    • 7 *.md files (464 lines of code)
    • 3 *.py files (161 lines of code)
  • " *.json" is biggest, containing 82.87% of code.
  • " *.py" is smallest, containing 4.41% of code.


*.json3024 LOC (82%) 4 files
*.md464 LOC (12%) 7 files
*.py161 LOC (4%) 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
  • *.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
  • *.tsx files are analyzed with TypeScriptAnalyzer:
    • 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
  • *.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
  • *.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
  • *.ts files are analyzed with TypeScriptAnalyzer:
    • 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
  • *.html files are analyzed with HtmlAnalyzer:
    • 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
  • *.tpp 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
  • *.bzl 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
  • *.css files are analyzed with CssAnalyzer:
    • 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
  • *.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
  • *.js files are analyzed with JavaScriptAnalyzer:
    • 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


2022-01-24 14:35