alibaba / rtp-llm
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
cfg
txt
pt
ini
tpl
patch
in
m4
csproj
plist
pb
pyi
inl
storyboard
vim
el
clang-format
gitmodules
gitattributes
targets
nuspec
podspec
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.

main158056 LOC (83%) 1,119 files
test24348 LOC (12%) 228 files
generated0 LOC (0%) 0 files
build and deployment456 LOC (<1%) 11 files
other7198 LOC (3%) 30 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
inl
pyi
proto
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 1119 files match defined criteria (158,056 LOC, 100.0% vs. main code):
    • 414 *.h files (41,308 LOC)
    • 237 *.cc files (39,312 LOC)
    • 299 *.py files (37,852 LOC)
    • 60 *.cu files (21,689 LOC)
    • 14 *.cuh files (4,937 LOC)
    • 53 *.cpp files (4,530 LOC)
    • 20 *.hpp files (3,727 LOC)
    • 14 *.bzl files (2,645 LOC)
    • 3 *.inl files (1,321 LOC)
    • 2 *.pyi files (472 LOC)
    • 3 *.proto files (263 LOC)
  • " *.h" is biggest, containing 26.14% of LOC.
  • " *.proto" is smallest, containing 0.17% of LOC.


*.h41308 LOC (26%) 414 files
*.cc39312 LOC (24%) 237 files
*.py37852 LOC (23%) 299 files
*.cu21689 LOC (13%) 60 files
*.cuh4937 LOC (3%) 14 files
*.cpp4530 LOC (2%) 53 files
*.hpp3727 LOC (2%) 20 files
*.bzl2645 LOC (1%) 14 files
*.inl1321 LOC (<1%) 3 files
*.pyi472 LOC (<1%) 2 files
*.proto263 LOC (<1%) 3 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
pyi
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]ests/.*".
    • 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 ".*/test[.].*".
    • files with paths like ".*_tests[.].*".
    • files with paths like ".*[.][Tt]est/.*".
    • files with paths like ".*[.][Tt]est[.].*".
  • 228 files match defined criteria (24,348 LOC, 15.4% vs. main code):
    • 105 *.cc files (11,606 LOC)
    • 61 *.py files (6,878 LOC)
    • 27 *.cpp files (3,134 LOC)
    • 27 *.h files (1,844 LOC)
    • 6 *.cu files (834 LOC)
    • 1 *.bzl files (37 LOC)
    • 1 *.pyi files (15 LOC)
  • " *.cc" is biggest, containing 47.67% of LOC.
  • " *.pyi" is smallest, containing 0.06% of LOC.


*.cc11606 LOC (47%) 105 files
*.py6878 LOC (28%) 61 files
*.cpp3134 LOC (12%) 27 files
*.h1844 LOC (7%) 27 files
*.cu834 LOC (3%) 6 files
*.bzl37 LOC (<1%) 1 file
*.pyi15 LOC (<1%) 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 ".*/[.]gitmodules".
    • files with paths like ".*[.]podspec".
    • files with paths like ".*/pom[.]xml".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]nuspec".
    • files with paths like ".*[.]csproj".
    • files with paths like ".*/[.]gitattributes".
  • 11 files match defined criteria (456 LOC, 0.3% vs. main code). All matches are in *.sh files.


*.sh456 LOC (100%) 11 files
Other Code
patch
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]patch".
    • files with paths like ".*[.]vim".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]pb".
    • files with paths like ".*[.]ini".
    • files with paths like ".*[.]plist".
    • files with paths like ".*[.]storyboard".
    • files with paths like ".*[.]xib".
    • files with paths like ".*/[.]dockerignore".
  • 30 files match defined criteria (7,198 LOC, 4.6% vs. main code):
    • 6 *.json files (4,445 LOC)
    • 15 *.patch files (2,308 LOC)
    • 9 *.md files (445 LOC)
  • " *.json" is biggest, containing 61.75% of LOC.
  • " *.md" is smallest, containing 6.18% of LOC.


*.json4445 LOC (61%) 6 files
*.patch2308 LOC (32%) 15 files
*.md445 LOC (6%) 9 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-14 19:01