elastic / apm-agent-dotnet
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
csproj
cshtml
fs
feature
props
txt
editorconfig
aspx
asax
targets
dotsettings
asmx
proto
fsproj
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.

main87873 LOC (56%) 729 files
test59295 LOC (38%) 638 files
generated0 LOC (0%) 0 files
build and deployment641 LOC (<1%) 36 files
other7537 LOC (4%) 69 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
fs
props
fsproj
targets
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 729 files match defined criteria (87,873 LOC, 100.0% vs. main code):
    • 670 *.cs files (70,787 LOC)
    • 40 *.rs files (15,248 LOC)
    • 7 *.fs files (717 LOC)
    • 1 *.asciidoc files (667 LOC)
    • 5 *.props files (204 LOC)
    • 3 *.toml files (171 LOC)
    • 1 *.fsproj files (36 LOC)
    • 1 *.yaml files (25 LOC)
    • 1 *.targets files (18 LOC)
  • " *.cs" is biggest, containing 80.56% of LOC.
  • " *.targets" is smallest, containing 0.02% of LOC.


*.cs70787 LOC (80%) 670 files
*.rs15248 LOC (17%) 40 files
*.fs717 LOC (<1%) 7 files
*.asciidoc667 LOC (<1%) 1 file
*.props204 LOC (<1%) 5 files
*.toml171 LOC (<1%) 3 files
*.fsproj36 LOC (<1%) 1 file
*.yaml25 LOC (<1%) 1 file
*.targets18 LOC (<1%) 1 file
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
csproj
cshtml
feature
aspx
props
proto
asmx
asax
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/test_.*".
    • files with paths like ".*/[Ss]pecs/.*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*[.][Tt]ests[.].*".
    • files with paths like ".*[.][Tt]ests/.*".
    • files with paths like ".*[.]feature".
    • files with paths like ".*_tests[.].*".
  • 638 files match defined criteria (59,295 LOC, 67.5% vs. main code):
    • 511 *.cs files (42,564 LOC)
    • 9 *.js files (9,848 LOC)
    • 6 *.css files (3,870 LOC)
    • 52 *.csproj files (1,256 LOC)
    • 45 *.cshtml files (934 LOC)
    • 6 *.feature files (497 LOC)
    • 3 *.tf files (186 LOC)
    • 2 *.aspx files (98 LOC)
    • 1 *.props files (23 LOC)
    • 1 *.proto files (17 LOC)
    • 1 *.asmx files (1 LOC)
    • 1 *.asax files (1 LOC)
  • " *.cs" is biggest, containing 71.78% of LOC.
  • " *.asax" is smallest, containing 0% of LOC.


*.cs42564 LOC (71%) 511 files
*.js9848 LOC (16%) 9 files
*.css3870 LOC (6%) 6 files
*.csproj1256 LOC (2%) 52 files
*.cshtml934 LOC (1%) 45 files
*.feature497 LOC (<1%) 6 files
*.tf186 LOC (<1%) 3 files
*.aspx98 LOC (<1%) 2 files
*.props23 LOC (<1%) 1 file
*.proto17 LOC (<1%) 1 file
*.asmx1 LOC (<1%) 1 file
*.asax1 LOC (<1%) 1 file
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 ".*[.]sh".
    • files with paths like ".*[.]csproj".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]bat".
  • 36 files match defined criteria (641 LOC, 0.7% vs. main code):
    • 33 *.csproj files (615 LOC)
    • 2 *.sh files (24 LOC)
    • 1 *.bat files (2 LOC)
  • " *.csproj" is biggest, containing 95.94% of LOC.
  • " *.bat" is smallest, containing 0.31% of LOC.


*.csproj615 LOC (95%) 33 files
*.sh24 LOC (3%) 2 files
*.bat2 LOC (<1%) 1 file
Other Code
txt
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
  • 69 files match defined criteria (7,537 LOC, 8.6% vs. main code):
    • 42 *.json files (6,004 LOC)
    • 22 *.md files (1,456 LOC)
    • 5 *.txt files (77 LOC)
  • " *.json" is biggest, containing 79.66% of LOC.
  • " *.txt" is smallest, containing 1.02% of LOC.


*.json6004 LOC (79%) 42 files
*.md1456 LOC (19%) 22 files
*.txt77 LOC (1%) 5 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-13 19:46