elastic / observability-examples
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
csproj
properties
mod
npmrc
ini
cmd
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.

main7366 LOC (15%) 107 files
test1176 LOC (2%) 4 files
generated18789 LOC (38%) 5 files
build and deployment827 LOC (1%) 23 files
other20752 LOC (42%) 65 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 107 files match defined criteria (7,366 LOC, 100.0% vs. main code):
    • 43 *.js files (2,777 LOC)
    • 2 *.scss files (1,344 LOC)
    • 15 *.java files (990 LOC)
    • 20 *.cs files (736 LOC)
    • 12 *.py files (722 LOC)
    • 3 *.go files (497 LOC)
    • 2 *.yaml files (116 LOC)
    • 2 *.css files (66 LOC)
    • 5 *.xml files (62 LOC)
    • 2 *.html files (40 LOC)
    • 1 *.toml files (16 LOC)
  • " *.js" is biggest, containing 37.7% of LOC.
  • " *.toml" is smallest, containing 0.22% of LOC.


*.js2777 LOC (37%) 43 files
*.scss1344 LOC (18%) 2 files
*.java990 LOC (13%) 15 files
*.cs736 LOC (9%) 20 files
*.py722 LOC (9%) 12 files
*.go497 LOC (6%) 3 files
*.yaml116 LOC (1%) 2 files
*.css66 LOC (<1%) 2 files
*.xml62 LOC (<1%) 5 files
*.html40 LOC (<1%) 2 files
*.toml16 LOC (<1%) 1 file
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 paths like ".*[.]test[.].*".
  • 4 files match defined criteria (1,176 LOC, 16.0% vs. main code):
    • 1 *.yaml files (1,158 LOC)
    • 2 *.js files (10 LOC)
    • 1 *.py files (8 LOC)
  • " *.yaml" is biggest, containing 98.47% of LOC.
  • " *.py" is smallest, containing 0.68% of LOC.


*.yaml1158 LOC (98%) 1 file
*.js10 LOC (<1%) 2 files
*.py8 LOC (<1%) 1 file
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 ".*/package[-]lock[.]json".
  • 5 files match defined criteria (18,789 LOC, 255.1% vs. main code). All matches are in *.json files.


*.json18789 LOC (100%) 5 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
csproj
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/package[.]json".
    • files with paths like ".*[.]csproj".
    • files with paths like ".*/pom[.]xml".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*[.]sh".
  • 23 files match defined criteria (827 LOC, 11.2% vs. main code):
    • 6 *.xml files (649 LOC)
    • 8 *.csproj files (126 LOC)
    • 9 *.sh files (52 LOC)
  • " *.xml" is biggest, containing 78.48% of LOC.
  • " *.sh" is smallest, containing 6.29% of LOC.


*.xml649 LOC (78%) 6 files
*.csproj126 LOC (15%) 8 files
*.sh52 LOC (6%) 9 files
Other Code
mod
txt
properties
ini
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]npmrc".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.]ini".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*[.]svg".
  • 65 files match defined criteria (20,752 LOC, 281.7% vs. main code):
    • 30 *.json files (19,561 LOC)
    • 13 *.md files (943 LOC)
    • 3 *.mod files (140 LOC)
    • 11 *.txt files (90 LOC)
    • 5 *.properties files (10 LOC)
    • 2 *.svg files (6 LOC)
    • 1 *.ini files (2 LOC)
  • " *.json" is biggest, containing 94.26% of LOC.
  • " *.ini" is smallest, containing 0.01% of LOC.


*.json19561 LOC (94%) 30 files
*.md943 LOC (4%) 13 files
*.mod140 LOC (<1%) 3 files
*.txt90 LOC (<1%) 11 files
*.properties10 LOC (<1%) 5 files
*.svg6 LOC (<1%) 2 files
*.ini2 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-13 20:03