firecracker-microvm / firecracker
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
ini
patch
asc
  • 15 extensions are included in analyses: rs, py, md, toml, json, c, svg, sh, txt, ini, gitignore, rb, patch, asc, yaml
  • 7 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/bin/.*" (Binaries for distribution) (4 files).
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (5 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (33 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) (0 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.

main54149 LOC (69%) 241 files
test15480 LOC (19%) 114 files
generated0 LOC (0%) 0 files
build and deployment63 LOC (<1%) 2 files
other7775 LOC (10%) 25 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
asc
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 241 files match defined criteria (54,149 lines of code, 100.0% vs. main code):
    • 212 *.rs files (52,704 lines of code)
    • 1 *.yaml files (888 lines of code)
    • 22 *.toml files (339 lines of code)
    • 5 *.py files (194 lines of code)
    • 1 *.asc files (24 lines of code)
  • " *.rs" is biggest, containing 97.33% of code.
  • " *.asc" is smallest, containing 0.04% of code.


*.rs52704 LOC (97%) 212 files
*.yaml888 LOC (1%) 1 files
*.toml339 LOC (<1%) 22 files
*.py194 LOC (<1%) 5 files
*.asc24 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 ".*/[Tt]ests/.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*_tests[.].*".
    • files with any line of content like ".*/simpletest/.*".
  • 114 files match defined criteria (15,480 lines of code, 28.6% vs. main code):
    • 91 *.py files (12,983 lines of code)
    • 12 *.rs files (2,011 lines of code)
    • 6 *.c files (368 lines of code)
    • 3 *.sh files (97 lines of code)
    • 1 *.toml files (13 lines of code)
    • 1 *.rb files (8 lines of code)
  • " *.py" is biggest, containing 83.87% of code.
  • " *.rb" is smallest, containing 0.05% of code.


*.py12983 LOC (83%) 91 files
*.rs2011 LOC (12%) 12 files
*.c368 LOC (2%) 6 files
*.sh97 LOC (<1%) 3 files
*.toml13 LOC (<1%) 1 files
*.rb8 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 ".*/[.]gitignore".
  • 2 files match defined criteria (63 lines of code, 0.1% vs. main code). All matches are in *.sh files.


*.sh63 LOC (100%) 2 files
Other Code
patch
ini
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]json".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]ini".
    • files with paths like ".*[.]patch".
    • files with paths like ".*[.]svg".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[.]gitignore".
  • 25 files match defined criteria (7,775 lines of code, 14.4% vs. main code):
    • 12 *.json files (6,032 lines of code)
    • 11 *.md files (1,702 lines of code)
    • 1 *.patch files (26 lines of code)
    • 1 *.ini files (15 lines of code)
  • " *.json" is biggest, containing 77.58% of code.
  • " *.ini" is smallest, containing 0.19% of code.


*.json6032 LOC (77%) 12 files
*.md1702 LOC (21%) 11 files
*.patch26 LOC (<1%) 1 files
*.ini15 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.rs 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
  • *.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
  • *.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
  • *.asc 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


2022-02-01 03:59