elastic / apm-data
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
proto
mod
txt
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.

main48399 LOC (70%) 263 files
test13695 LOC (20%) 72 files
generated3570 LOC (5%) 2 files
build and deployment35 LOC (<1%) 2 files
other2700 LOC (3%) 40 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
proto
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 263 files match defined criteria (48,399 LOC, 100.0% vs. main code):
    • 224 *.go files (47,110 LOC)
    • 38 *.proto files (1,280 LOC)
    • 1 *.yaml files (9 LOC)
  • " *.go" is biggest, containing 97.34% of LOC.
  • " *.yaml" is smallest, containing 0.02% of LOC.


*.go47110 LOC (97%) 224 files
*.proto1280 LOC (2%) 38 files
*.yaml9 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_.*".
  • 72 files match defined criteria (13,695 LOC, 28.3% vs. main code). All matches are in *.go files.


*.go13695 LOC (100%) 72 files
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 ".*_generated[.][a-z]+".
  • 2 files match defined criteria (3,570 LOC, 7.4% vs. main code). All matches are in *.go files.


*.go3570 LOC (100%) 2 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 ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]sh".
  • 2 files match defined criteria (35 LOC, 0.1% vs. main code). All matches are in *.sh files.


*.sh35 LOC (100%) 2 files
Other Code
mod
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*[.]json".
  • 40 files match defined criteria (2,700 LOC, 5.6% vs. main code):
    • 35 *.json files (2,473 LOC)
    • 4 *.md files (171 LOC)
    • 1 *.mod files (56 LOC)
  • " *.json" is biggest, containing 91.59% of LOC.
  • " *.mod" is smallest, containing 2.07% of LOC.


*.json2473 LOC (91%) 35 files
*.md171 LOC (6%) 4 files
*.mod56 LOC (2%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-13 20:00