awslabs / multi-model-server
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
properties
txt
in
ini
  • 16 extensions are included in analyses: py, java, md, yaml, json, sh, gradle, xml, properties, txt, yml, gitignore, rst, bat, in, ini
  • 7 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/docs/.*" (Documentation) (17 files).
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (12 files).
    • exclude files with path like ".*/gradle/wrapper/.*" (Gradle) (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 ".*[.]txt" (Text files) (6 files).
    • exclude files with path like ".*/sokrates_conventions[.]json" (Sokrates scoping conventions) (1 file).
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.

main10148 LOC (38%) 147 files
test5921 LOC (22%) 104 files
generated0 LOC (0%) 0 files
build and deployment851 LOC (3%) 22 files
other9426 LOC (35%) 93 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
in
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 147 files match defined criteria (10,148 lines of code, 100.0% vs. main code):
    • 97 *.java files (7,732 lines of code)
    • 45 *.py files (2,325 lines of code)
    • 1 *.yaml files (51 lines of code)
    • 2 *.yml files (36 lines of code)
    • 2 *.in files (4 lines of code)
  • " *.java" is biggest, containing 76.19% of code.
  • " *.in" is smallest, containing 0.04% of code.


*.java7732 LOC (76%) 97 files
*.py2325 LOC (22%) 45 files
*.yaml51 LOC (<1%) 1 files
*.yml36 LOC (<1%) 2 files
*.in4 LOC (<1%) 2 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 ".*_tests[.].*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*[-]tests/.*".
    • files with any line of content like ".*/simpletest/.*".
  • 104 files match defined criteria (5,921 lines of code, 58.3% vs. main code):
    • 56 *.py files (2,538 lines of code)
    • 10 *.java files (2,019 lines of code)
    • 36 *.yaml files (1,280 lines of code)
    • 2 *.sh files (84 lines of code)
  • " *.py" is biggest, containing 42.86% of code.
  • " *.sh" is smallest, containing 1.42% of code.


*.py2538 LOC (42%) 56 files
*.java2019 LOC (34%) 10 files
*.yaml1280 LOC (21%) 36 files
*.sh84 LOC (1%) 2 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 ".*[.]gradle".
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/pom[.]xml".
  • 22 files match defined criteria (851 lines of code, 8.4% vs. main code):
    • 14 *.gradle files (581 lines of code)
    • 6 *.sh files (148 lines of code)
    • 2 *.bat files (122 lines of code)
  • " *.gradle" is biggest, containing 68.27% of code.
  • " *.bat" is smallest, containing 14.34% of code.


*.gradle581 LOC (68%) 14 files
*.sh148 LOC (17%) 6 files
*.bat122 LOC (14%) 2 files
Other Code
properties
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 ".*[.]ini".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]properties".
    • files with paths like ".*/checkstyle[.]xml".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 93 files match defined criteria (9,426 lines of code, 92.9% vs. main code):
    • 26 *.json files (4,668 lines of code)
    • 20 *.md files (2,178 lines of code)
    • 21 *.py files (1,237 lines of code)
    • 13 *.xml files (1,047 lines of code)
    • 10 *.properties files (167 lines of code)
    • 2 *.rst files (122 lines of code)
    • 1 *.ini files (7 lines of code)
  • " *.json" is biggest, containing 49.52% of code.
  • " *.ini" is smallest, containing 0.07% of code.


*.json4668 LOC (49%) 26 files
*.md2178 LOC (23%) 20 files
*.py1237 LOC (13%) 21 files
*.xml1047 LOC (11%) 13 files
*.properties167 LOC (1%) 10 files
*.rst122 LOC (1%) 2 files
*.ini7 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.java files are analyzed with JavaAnalyzer:
    • 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 (based on package names)
  • *.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
  • *.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
  • *.yml 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-01-31 18:19