tensorflow / model-analysis
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
proto
txt
in
  • 11 extensions are included in analyses: py, js, html, md, proto, yaml, bzl, json, txt, in, sh
  • 7 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/(3rd|[Tt]hird)[-_]?[Pp]arty/.*" (Dependencies) (2 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 ".*/d3(\.v\d+)?([^.]*)\.js" (D3) (4 files).
    • exclude files with path like ".*/sokrates_conventions[.]json" (Sokrates scoping conventions) (1 file).
    • exclude files with path like ".*[.]txt" (Text files) (0 files).
    • exclude files with path like ".*/(vuejs|js/lib)/.*" (5 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.

main42806 LOC (50%) 284 files
test33412 LOC (39%) 170 files
generated0 LOC (0%) 0 files
build and deployment41 LOC (<1%) 2 files
other7910 LOC (9%) 157 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
proto
in
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 284 files match defined criteria (42,806 lines of code, 100.0% vs. main code):
    • 171 *.py files (20,811 lines of code)
    • 98 *.js files (20,187 lines of code)
    • 3 *.proto files (1,076 lines of code)
    • 8 *.html files (544 lines of code)
    • 3 *.yaml files (187 lines of code)
    • 1 *.in files (1 lines of code)
  • " *.py" is biggest, containing 48.62% of code.
  • " *.in" is smallest, containing 0% of code.


*.py20811 LOC (48%) 171 files
*.js20187 LOC (47%) 98 files
*.proto1076 LOC (2%) 3 files
*.html544 LOC (1%) 8 files
*.yaml187 LOC (<1%) 3 files
*.in1 LOC (<1%) 1 files
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 ".*_test[.].*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*/[Tt]est/.*".
    • files with any line of content like ".*/simpletest/.*".
  • 170 files match defined criteria (33,412 lines of code, 78.1% vs. main code):
    • 88 *.py files (26,265 lines of code)
    • 45 *.js files (6,590 lines of code)
    • 37 *.html files (557 lines of code)
  • " *.py" is biggest, containing 78.61% of code.
  • " *.html" is smallest, containing 1.67% of code.


*.py26265 LOC (78%) 88 files
*.js6590 LOC (19%) 45 files
*.html557 LOC (1%) 37 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 ".*([.]|/)webpack([.]|/).*".
    • files with paths like ".*/package[.]json".
  • 2 files match defined criteria (41 lines of code, 0.1% vs. main code):
    • 1 *.js files (36 lines of code)
    • 1 *.sh files (5 lines of code)
  • " *.js" is biggest, containing 87.8% of code.
  • " *.sh" is smallest, containing 12.2% of code.


*.js36 LOC (87%) 1 files
*.sh5 LOC (12%) 1 files
Other Code
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 ".*[.]json".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[Dd]emos?/.*".
  • 157 files match defined criteria (7,910 lines of code, 18.5% vs. main code):
    • 82 *.md files (5,317 lines of code)
    • 36 *.js files (2,079 lines of code)
    • 38 *.html files (471 lines of code)
    • 1 *.json files (43 lines of code)
  • " *.md" is biggest, containing 67.22% of code.
  • " *.json" is smallest, containing 0.54% of code.


*.md5317 LOC (67%) 82 files
*.js2079 LOC (26%) 36 files
*.html471 LOC (5%) 38 files
*.json43 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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.in files are analyzed with RustAnalyzer:
    • 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-02-03 08:04