microsoft / perfview
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
xaml
csproj
props
nuspec
targets
vcxproj
man
filters
gitattributes
TXT
editorconfig
resx
cmd
  • 29 extensions are included in analyses: cs, txt, xaml, csproj, md, xml, json, bat, htm, cpp, h, props, sh, yml, nuspec, targets, vcxproj, man, gitignore, dockerfile, filters, gitattributes, TXT, editorconfig, html, resx, XML, asm, cmd
  • 6 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (6 files).
    • exclude files with path like ".*[.]resx" (The resx resource files) (1 file).
    • 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) (25 files).
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.

main274859 LOC (48%) 381 files
test7524 LOC (1%) 51 files
generated58 LOC (<1%) 2 files
build and deployment1571 LOC (<1%) 25 files
other285748 LOC (50%) 44 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
man
xaml
vcxproj
props
filters
targets
txt
cmd
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 381 files match defined criteria (274,859 lines of code, 100.0% vs. main code):
    • 323 *.cs files (253,054 lines of code)
    • 5 *.htm files (9,833 lines of code)
    • 2 *.man files (6,226 lines of code)
    • 25 *.xaml files (2,998 lines of code)
    • 5 *.h files (1,015 lines of code)
    • 5 *.cpp files (759 lines of code)
    • 2 *.vcxproj files (236 lines of code)
    • 1 *.html files (188 lines of code)
    • 1 *.xml files (153 lines of code)
    • 4 *.props files (146 lines of code)
    • 2 *.filters files (125 lines of code)
    • 1 *.asm files (52 lines of code)
    • 2 *.targets files (28 lines of code)
    • 1 *.txt files (18 lines of code)
    • 1 *.cmd files (15 lines of code)
    • 1 *.yml files (13 lines of code)
  • " *.cs" is biggest, containing 92.07% of code.
  • " *.yml" is smallest, containing 0% of code.


*.cs253054 LOC (92%) 323 files
*.htm9833 LOC (3%) 5 files
*.man6226 LOC (2%) 2 files
*.xaml2998 LOC (1%) 25 files
*.h1015 LOC (<1%) 5 files
*.cpp759 LOC (<1%) 5 files
*.vcxproj236 LOC (<1%) 2 files
*.html188 LOC (<1%) 1 files
*.xml153 LOC (<1%) 1 files
*.props146 LOC (<1%) 4 files
*.filters125 LOC (<1%) 2 files
*.asm52 LOC (<1%) 1 files
*.targets28 LOC (<1%) 2 files
*.txt18 LOC (<1%) 1 files
*.cmd15 LOC (<1%) 1 files
*.yml13 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
csproj
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.][Tt]ests/.*".
    • files with paths like ".*[.][Tt]ests[.].*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with any line of content like ".*/simpletest/.*".
  • 51 files match defined criteria (7,524 lines of code, 2.7% vs. main code):
    • 42 *.cs files (7,309 lines of code)
    • 4 *.csproj files (171 lines of code)
    • 2 *.dockerfile files (24 lines of code)
    • 3 *.sh files (20 lines of code)
  • " *.cs" is biggest, containing 97.14% of code.
  • " *.sh" is smallest, containing 0.27% of code.


*.cs7309 LOC (97%) 42 files
*.csproj171 LOC (2%) 4 files
*.dockerfile24 LOC (<1%) 2 files
*.sh20 LOC (<1%) 3 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 ".*[.]cs" AND any line of content like "[/][/][ ]*".
  • 2 files match defined criteria (58 lines of code, 0.0% vs. main code). All matches are in *.cs files.


*.cs58 LOC (100%) 2 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
csproj
nuspec
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitattributes".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]csproj".
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]nuspec".
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]dockerfile".
  • 25 files match defined criteria (1,571 lines of code, 0.6% vs. main code):
    • 17 *.csproj files (1,380 lines of code)
    • 3 *.nuspec files (120 lines of code)
    • 5 *.bat files (71 lines of code)
  • " *.csproj" is biggest, containing 87.84% of code.
  • " *.bat" is smallest, containing 4.52% of code.


*.csproj1380 LOC (87%) 17 files
*.nuspec120 LOC (7%) 3 files
*.bat71 LOC (4%) 5 files
Other Code
csproj
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[Dd]ocumentation/.*".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 44 files match defined criteria (285,748 lines of code, 104.0% vs. main code):
    • 7 *.xml files (282,848 lines of code)
    • 18 *.cs files (1,836 lines of code)
    • 12 *.md files (1,020 lines of code)
    • 6 *.json files (29 lines of code)
    • 1 *.csproj files (15 lines of code)
  • " *.xml" is biggest, containing 98.99% of code.
  • " *.csproj" is smallest, containing 0.01% of code.


*.xml282848 LOC (98%) 7 files
*.cs1836 LOC (<1%) 18 files
*.md1020 LOC (<1%) 12 files
*.json29 LOC (<1%) 6 files
*.csproj15 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.cs files are analyzed with CSharpAnalyzer:
    • 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 (based on namespace heuristics)
  • *.htm files are analyzed with HtmlAnalyzer:
    • 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
  • *.man 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
  • *.xaml files are analyzed with XmlAnalyzer:
    • 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)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.h 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
  • *.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
  • *.vcxproj files are analyzed with XmlAnalyzer:
    • 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)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.html files are analyzed with HtmlAnalyzer:
    • 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
  • *.xml files are analyzed with XmlAnalyzer:
    • 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)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.props files are analyzed with XmlAnalyzer:
    • 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)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.filters files are analyzed with XmlAnalyzer:
    • 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)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.asm 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
  • *.targets files are analyzed with XmlAnalyzer:
    • 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)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.txt 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
  • *.cmd 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
  • *.yml files are analyzed with YamlAnalyzer:
    • 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)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis


2022-01-30 09:46