android / performance-samples
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
properties
pro
txt
gitmodules
  • 18 extensions are included in analyses: xml, kt, gradle, gitignore, properties, md, json, pro, ts, bat, txt, sh, yml, cpp, java, html, h, gitmodules
  • 9 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (16 files).
    • exclude files with path like ".*/proguard[-]rules[.]pro" (ProGuard) (4 files).
    • exclude files with path like ".*/gradle/wrapper/.*" (Gradle) (5 files).
    • exclude files with path like ".*/target/.*" (Compiled files) (4 files).
    • exclude files with path like ".*/(3rd|[Tt]hird)[-_]?[Pp]arty/.*" (Dependencies) (2 files).
    • exclude files with path like ".*/git[-]history[.]txt" (Git history) (1 file).
    • exclude files with path like ".*/git[-][a-zA-Z0-9_]+[.]txt" (Git data exports for sokrates analyses) (0 files).
    • exclude files with path like ".*/sokrates_conventions[.]json" (Sokrates scoping conventions) (1 file).
    • exclude files with path like ".*[.]txt" (Text files) (1 file).
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.

main1316 LOC (10%) 32 files
test366 LOC (2%) 10 files
generated3966 LOC (31%) 1 files
build and deployment732 LOC (5%) 25 files
other6049 LOC (48%) 68 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
pro
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 32 files match defined criteria (1,316 lines of code, 100.0% vs. main code):
    • 21 *.kt files (735 lines of code)
    • 6 *.ts files (314 lines of code)
    • 2 *.cpp files (210 lines of code)
    • 3 *.pro files (57 lines of code)
  • " *.kt" is biggest, containing 55.85% of code.
  • " *.pro" is smallest, containing 4.33% of code.


*.kt735 LOC (55%) 21 files
*.ts314 LOC (23%) 6 files
*.cpp210 LOC (15%) 2 files
*.pro57 LOC (4%) 3 files
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 ".*/src/androidTest/.*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*_test[.].*".
    • files with any line of content like ".*/simpletest/.*".
  • 10 files match defined criteria (366 lines of code, 27.8% vs. main code):
    • 8 *.kt files (301 lines of code)
    • 2 *.java files (65 lines of code)
  • " *.kt" is biggest, containing 82.24% of code.
  • " *.java" is smallest, containing 17.76% of code.


*.kt301 LOC (82%) 8 files
*.java65 LOC (17%) 2 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 ".*/package[-]lock[.]json".
  • 1 file matches defined criteria (3,966 lines of code, 301.4% vs. main code). All matches are in *.json files.


*.json3966 LOC (100%) 1 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 ".*[.]gradle".
    • files with paths like ".*/AndroidManifest[.]xml".
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*/[.]gitmodules".
  • 25 files match defined criteria (732 lines of code, 55.6% vs. main code):
    • 17 *.gradle files (379 lines of code)
    • 5 *.bat files (317 lines of code)
    • 3 *.sh files (36 lines of code)
  • " *.gradle" is biggest, containing 51.78% of code.
  • " *.sh" is smallest, containing 4.92% of code.


*.gradle379 LOC (51%) 17 files
*.bat317 LOC (43%) 5 files
*.sh36 LOC (4%) 3 files
Other Code
properties
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 ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 68 files match defined criteria (6,049 lines of code, 459.7% vs. main code):
    • 7 *.json files (4,211 lines of code)
    • 47 *.xml files (1,259 lines of code)
    • 9 *.md files (466 lines of code)
    • 5 *.properties files (113 lines of code)
  • " *.json" is biggest, containing 69.61% of code.
  • " *.properties" is smallest, containing 1.87% of code.


*.json4211 LOC (69%) 7 files
*.xml1259 LOC (20%) 47 files
*.md466 LOC (7%) 9 files
*.properties113 LOC (1%) 5 files
Analyzers
Info about analyzers used for source code examinations.
  • *.kt files are analyzed with KotlinAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • Basic heuristic dependency analysis (based on imports and package statements)
  • *.ts files are analyzed with TypeScriptAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • No dependency analysis
  • *.cpp files are analyzed with CppAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • Advanced heuristic dependency analysis
  • *.pro files are analyzed with DefaultLanguageAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Basic code cleaning (empty lines removed for LOC calculations and duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis


2022-02-03 05:22