facebookresearch / DLRM-FlexFlow
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
cu
cc
txt
cmake
pb
in
gitmodules
mk
  • 19 extensions are included in analyses: py, cu, cc, h, sh, txt, rst, md, cmake, pb, in, gitignore, bat, json, yml, gitmodules, mk, yaml, inc
  • 5 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/docs/.*" (Documentation) (15 files).
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (3 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) (15 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.

main44759 LOC (77%) 194 files
test2582 LOC (4%) 31 files
generated0 LOC (0%) 0 files
build and deployment205 LOC (<1%) 7 files
other9940 LOC (17%) 119 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
cu
cc
cmake
in
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 194 files match defined criteria (44,759 lines of code, 100.0% vs. main code):
    • 37 *.cu files (17,795 lines of code)
    • 18 *.cc files (11,063 lines of code)
    • 110 *.py files (10,772 lines of code)
    • 20 *.h files (4,828 lines of code)
    • 6 *.cmake files (181 lines of code)
    • 1 *.inc files (71 lines of code)
    • 1 *.yaml files (25 lines of code)
    • 1 *.in files (24 lines of code)
  • " *.cu" is biggest, containing 39.76% of code.
  • " *.in" is smallest, containing 0.05% of code.


*.cu17795 LOC (39%) 37 files
*.cc11063 LOC (24%) 18 files
*.py10772 LOC (24%) 110 files
*.h4828 LOC (10%) 20 files
*.cmake181 LOC (<1%) 6 files
*.inc71 LOC (<1%) 1 files
*.yaml25 LOC (<1%) 1 files
*.in24 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
cc
cu
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/test_.*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*_tests[.].*".
    • files with paths like ".*_test[.].*".
  • 31 files match defined criteria (2,582 lines of code, 5.8% vs. main code):
    • 14 *.cc files (1,849 lines of code)
    • 2 *.py files (596 lines of code)
    • 7 *.sh files (94 lines of code)
    • 1 *.h files (36 lines of code)
    • 7 *.cu files (7 lines of code)
  • " *.cc" is biggest, containing 71.61% of code.
  • " *.cu" is smallest, containing 0.27% of code.


*.cc1849 LOC (71%) 14 files
*.py596 LOC (23%) 2 files
*.sh94 LOC (3%) 7 files
*.h36 LOC (1%) 1 files
*.cu7 LOC (<1%) 7 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
mk
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitmodules".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]mk".
  • 7 files match defined criteria (205 lines of code, 0.5% vs. main code):
    • 1 *.mk files (115 lines of code)
    • 6 *.sh files (90 lines of code)
  • " *.mk" is biggest, containing 56.1% of code.
  • " *.sh" is smallest, containing 43.9% of code.


*.mk115 LOC (56%) 1 files
*.sh90 LOC (43%) 6 files
Other Code
cc
cu
pb
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 ".*/INSTALL[.][a-z0-9]+".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[Ee]xamples/.*".
  • 119 files match defined criteria (9,940 lines of code, 22.2% vs. main code):
    • 80 *.py files (5,835 lines of code)
    • 9 *.cc files (3,012 lines of code)
    • 7 *.cu files (463 lines of code)
    • 7 *.h files (277 lines of code)
    • 6 *.md files (255 lines of code)
    • 3 *.pb files (52 lines of code)
    • 7 *.sh files (46 lines of code)
  • " *.py" is biggest, containing 58.7% of code.
  • " *.sh" is smallest, containing 0.46% of code.


*.py5835 LOC (58%) 80 files
*.cc3012 LOC (30%) 9 files
*.cu463 LOC (4%) 7 files
*.h277 LOC (2%) 7 files
*.md255 LOC (2%) 6 files
*.pb52 LOC (<1%) 3 files
*.sh46 LOC (<1%) 7 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.cc 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
  • *.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
  • *.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
  • *.inc files are analyzed with PhpAnalyzer:
    • 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
  • *.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-25 19:50