GoogleCloudPlatform / prometheus
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
libsonnet
snap
proto
mod
npmignore
l
y
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.

main88790 LOC (48%) 369 files
test85724 LOC (46%) 213 files
generated25 LOC (<1%) 1 file
build and deployment350 LOC (<1%) 9 files
other7878 LOC (4%) 64 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
y
proto
l
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 369 files match defined criteria (88,790 LOC, 100.0% vs. main code):
    • 260 *.go files (77,351 LOC)
    • 30 *.ts files (4,637 LOC)
    • 49 *.tsx files (4,141 LOC)
    • 4 *.js files (662 LOC)
    • 1 *.y files (656 LOC)
    • 7 *.html files (413 LOC)
    • 3 *.proto files (368 LOC)
    • 3 *.css files (215 LOC)
    • 5 *.scss files (156 LOC)
    • 2 *.l files (154 LOC)
    • 4 *.yaml files (36 LOC)
    • 1 *.cjs files (1 LOC)
  • " *.go" is biggest, containing 87.12% of LOC.
  • " *.cjs" is smallest, containing 0% of LOC.


*.go77351 LOC (87%) 260 files
*.ts4637 LOC (5%) 30 files
*.tsx4141 LOC (4%) 49 files
*.js662 LOC (<1%) 4 files
*.y656 LOC (<1%) 1 file
*.html413 LOC (<1%) 7 files
*.proto368 LOC (<1%) 3 files
*.css215 LOC (<1%) 3 files
*.scss156 LOC (<1%) 5 files
*.l154 LOC (<1%) 2 files
*.yaml36 LOC (<1%) 4 files
*.cjs1 LOC (<1%) 1 file
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
snap
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 ".*/test[.].*".
    • files with paths like ".*/testing[.].*".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with paths like ".*[.]snap".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/jest[.][a-zA-Z0-9\.]+".
  • 213 files match defined criteria (85,724 LOC, 96.5% vs. main code):
    • 170 *.go files (79,027 LOC)
    • 10 *.ts files (3,186 LOC)
    • 26 *.tsx files (2,034 LOC)
    • 4 *.snap files (1,437 LOC)
    • 2 *.cjs files (27 LOC)
    • 1 *.js files (13 LOC)
  • " *.go" is biggest, containing 92.19% of LOC.
  • " *.js" is smallest, containing 0.02% of LOC.


*.go79027 LOC (92%) 170 files
*.ts3186 LOC (3%) 10 files
*.tsx2034 LOC (2%) 26 files
*.snap1437 LOC (1%) 4 files
*.cjs27 LOC (<1%) 2 files
*.js13 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 any line of content like "// This file was generated .*".
  • 1 file matches defined criteria (25 LOC, 0.0% vs. main code). All matches are in *.sh files.


*.sh25 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[.]json".
  • 9 files match defined criteria (350 LOC, 0.4% vs. main code). All matches are in *.sh files.


*.sh350 LOC (100%) 9 files
Other Code
txt
libsonnet
mod
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 ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[Dd]ocumentation/.*".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]libsonnet".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/[.]npmignore".
    • files with paths like ".*/[.]dockerignore".
  • 64 files match defined criteria (7,878 LOC, 8.9% vs. main code):
    • 23 *.md files (3,148 LOC)
    • 14 *.go files (1,579 LOC)
    • 3 *.txt files (1,406 LOC)
    • 4 *.libsonnet files (889 LOC)
    • 15 *.json files (546 LOC)
    • 2 *.mod files (285 LOC)
    • 1 *.svg files (19 LOC)
    • 2 *.jsonnet files (6 LOC)
  • " *.md" is biggest, containing 39.96% of LOC.
  • " *.jsonnet" is smallest, containing 0.08% of LOC.


*.md3148 LOC (39%) 23 files
*.go1579 LOC (20%) 14 files
*.txt1406 LOC (17%) 3 files
*.libsonnet889 LOC (11%) 4 files
*.json546 LOC (6%) 15 files
*.mod285 LOC (3%) 2 files
*.svg19 LOC (<1%) 1 file
*.jsonnet6 LOC (<1%) 2 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 15:40