apache / hertzbeat
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
http
properties
editorconfig
proto
gitattributes
jsonc
tpl
gitmodules
cmd
eslintignore
prettierignore
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.

main78396 LOC (41%) 1,167 files
test20514 LOC (10%) 292 files
generated1514 LOC (<1%) 3 files
build and deployment3047 LOC (1%) 34 files
other83949 LOC (44%) 948 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
http
proto
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 1167 files match defined criteria (78,396 LOC, 100.0% vs. main code):
    • 824 *.java files (47,889 LOC)
    • 192 *.ts files (15,156 LOC)
    • 47 *.html files (7,395 LOC)
    • 6 *.css files (2,546 LOC)
    • 47 *.less files (2,436 LOC)
    • 13 *.xml files (1,125 LOC)
    • 6 *.js files (620 LOC)
    • 1 *.jsx files (463 LOC)
    • 21 *.sql files (275 LOC)
    • 6 *.http files (186 LOC)
    • 1 *.scss files (120 LOC)
    • 1 *.ps1 files (77 LOC)
    • 1 *.proto files (58 LOC)
    • 1 *.g4 files (50 LOC)
  • " *.java" is biggest, containing 61.09% of LOC.
  • " *.g4" is smallest, containing 0.06% of LOC.


*.java47889 LOC (61%) 824 files
*.ts15156 LOC (19%) 192 files
*.html7395 LOC (9%) 47 files
*.css2546 LOC (3%) 6 files
*.less2436 LOC (3%) 47 files
*.xml1125 LOC (1%) 13 files
*.js620 LOC (<1%) 6 files
*.jsx463 LOC (<1%) 1 file
*.sql275 LOC (<1%) 21 files
*.http186 LOC (<1%) 6 files
*.scss120 LOC (<1%) 1 file
*.ps177 LOC (<1%) 1 file
*.proto58 LOC (<1%) 1 file
*.g450 LOC (<1%) 1 file
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
proto
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/e2e/.*".
    • files with paths like ".*/karma[.]conf[.]js".
    • files with paths like ".*/test[.].*".
    • files with paths like ".*[.]spec[.]ts".
  • 292 files match defined criteria (20,514 LOC, 26.2% vs. main code):
    • 229 *.java files (19,026 LOC)
    • 58 *.ts files (966 LOC)
    • 2 *.yaml files (446 LOC)
    • 1 *.js files (37 LOC)
    • 1 *.proto files (24 LOC)
    • 1 *.sql files (15 LOC)
  • " *.java" is biggest, containing 92.75% of LOC.
  • " *.sql" is smallest, containing 0.07% of LOC.


*.java19026 LOC (92%) 229 files
*.ts966 LOC (4%) 58 files
*.yaml446 LOC (2%) 2 files
*.js37 LOC (<1%) 1 file
*.proto24 LOC (<1%) 1 file
*.sql15 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 "//[ ]*Generated by .*".
  • 3 files match defined criteria (1,514 LOC, 1.9% vs. main code). All matches are in *.java files.


*.java1514 LOC (100%) 3 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 ".*/pom[.]xml".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/docker[-]compose[.]yaml".
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]bat".
    • files with paths like ".*/assembly[.]xml".
    • files with paths like ".*/[.]gitmodules".
    • files with paths like ".*/[.]gitattributes".
    • files with paths like ".*/package[.]json".
  • 34 files match defined criteria (3,047 LOC, 3.9% vs. main code):
    • 28 *.xml files (2,756 LOC)
    • 4 *.yaml files (272 LOC)
    • 2 *.sh files (19 LOC)
  • " *.xml" is biggest, containing 90.45% of LOC.
  • " *.sh" is smallest, containing 0.62% of LOC.


*.xml2756 LOC (90%) 28 files
*.yaml272 LOC (8%) 4 files
*.sh19 LOC (<1%) 2 files
Other Code
txt
properties
tpl
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 ".*[.]txt".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/checkstyle[.]xml".
    • files with paths like ".*/checkstyle.*".
    • files with paths like ".*[.]properties".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/[.]prettierignore".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*/[.]eslintignore".
  • 948 files match defined criteria (83,949 LOC, 107.1% vs. main code):
    • 688 *.md files (55,836 LOC)
    • 194 *.txt files (14,685 LOC)
    • 43 *.json files (7,665 LOC)
    • 15 *.svg files (5,278 LOC)
    • 2 *.xml files (327 LOC)
    • 5 *.properties files (129 LOC)
    • 1 *.tpl files (29 LOC)
  • " *.md" is biggest, containing 66.51% of LOC.
  • " *.tpl" is smallest, containing 0.03% of LOC.


*.md55836 LOC (66%) 688 files
*.txt14685 LOC (17%) 194 files
*.json7665 LOC (9%) 43 files
*.svg5278 LOC (6%) 15 files
*.xml327 LOC (<1%) 2 files
*.properties129 LOC (<1%) 5 files
*.tpl29 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-07 20:35