azure / prometheus-collector
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
libsonnet
mod
txt
tpl
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.

main23814 LOC (14%) 225 files
test22564 LOC (13%) 109 files
generated6436 LOC (3%) 1 file
build and deployment123 LOC (<1%) 5 files
other114017 LOC (68%) 233 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
tpl
cmd
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 225 files match defined criteria (23,814 LOC, 100.0% vs. main code):
    • 70 *.go files (11,790 LOC)
    • 107 *.yaml files (9,120 LOC)
    • 10 *.ps1 files (989 LOC)
    • 4 *.tf files (685 LOC)
    • 5 *.tpl files (508 LOC)
    • 16 *.ts files (464 LOC)
    • 1 *.cmake files (148 LOC)
    • 1 *.cmd files (77 LOC)
    • 8 *.jsonnet files (20 LOC)
    • 1 *.py files (11 LOC)
    • 1 *.html files (1 LOC)
    • 1 *.cjs files (1 LOC)
  • " *.go" is biggest, containing 49.51% of LOC.
  • " *.cjs" is smallest, containing 0% of LOC.


*.go11790 LOC (49%) 70 files
*.yaml9120 LOC (38%) 107 files
*.ps1989 LOC (4%) 10 files
*.tf685 LOC (2%) 4 files
*.tpl508 LOC (2%) 5 files
*.ts464 LOC (1%) 16 files
*.cmake148 LOC (<1%) 1 file
*.cmd77 LOC (<1%) 1 file
*.jsonnet20 LOC (<1%) 8 files
*.py11 LOC (<1%) 1 file
*.html1 LOC (<1%) 1 file
*.cjs1 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 ".*/jest[.][a-zA-Z0-9\.]+".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*/test[.].*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*_tests[.].*".
    • files with paths like ".*[-]test[-].*".
  • 109 files match defined criteria (22,564 LOC, 94.8% vs. main code):
    • 64 *.go files (19,413 LOC)
    • 35 *.yaml files (2,834 LOC)
    • 2 *.sh files (176 LOC)
    • 7 *.ts files (134 LOC)
    • 1 *.js files (7 LOC)
  • " *.go" is biggest, containing 86.04% of LOC.
  • " *.js" is smallest, containing 0.03% of LOC.


*.go19413 LOC (86%) 64 files
*.yaml2834 LOC (12%) 35 files
*.sh176 LOC (<1%) 2 files
*.ts134 LOC (<1%) 7 files
*.js7 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".
  • 1 file matches defined criteria (6,436 LOC, 27.0% vs. main code). All matches are in *.json files.


*.json6436 LOC (100%) 1 file
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 ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*/package[.]json".
  • 5 files match defined criteria (123 LOC, 0.5% vs. main code). All matches are in *.sh files.


*.sh123 LOC (100%) 5 files
Other Code
libsonnet
mod
txt
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 ".*/[.]gitignore".
    • files with paths like ".*[.]libsonnet".
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*[.]ini".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*[.]svg".
  • 233 files match defined criteria (114,017 LOC, 478.8% vs. main code):
    • 99 *.json files (95,592 LOC)
    • 69 *.libsonnet files (12,351 LOC)
    • 37 *.md files (3,445 LOC)
    • 20 *.mod files (2,260 LOC)
    • 7 *.txt files (350 LOC)
    • 1 *.svg files (19 LOC)
  • " *.json" is biggest, containing 83.84% of LOC.
  • " *.svg" is smallest, containing 0.02% of LOC.


*.json95592 LOC (83%) 99 files
*.libsonnet12351 LOC (10%) 69 files
*.md3445 LOC (3%) 37 files
*.mod2260 LOC (1%) 20 files
*.txt350 LOC (<1%) 7 files
*.svg19 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-06 22:13