Configurations - Viladoman/CompileScore GitHub Wiki

This is the help section to setup the Extension options.

Because each solution might need different extra parameters and different needs, this solution specific options are stored in a file called CompileScoreSettings.json next to the solution file.

The options page can be opened from the Extensions/Compile Score/Solution Configuration tab.

Extensions

Fields

Some fields accept macros in the form $(MACRO). The valid macros will depend on the nature of the solution, check below for allowed macros.

Remember to use the Save button to apply your changes.

General

Property Description Macros
Score File Location File Path to the displayed Score File by default. Opened on startup and updated if changed. Yes

When a profile generation is triggered manually and it is generated in a different path, the tool window will show the newly generated data. The button in the lower-left corner of the main Compile Score tool window or the command under Extensions/Compile Score/Load Default Score will restore the startup behavior loading again the base score file.

Generator

When the generator is triggered it will execute a full [Score Generation]. Please check the page for a deeper understanding on what this section configures.

Property Description Macros
Compiler Select the Compiler used for building. Which will define the type of recorder used when profiling. No
Output File The path where the Score files will be generated. IMPORTANT: This filename needs a .scor extension. Yes
Overview Detail The level of detail captured for the overview aggregated data. Details Chart No
Timeline Detail The level of detail captured for the timeline flame graphs. Details Chart No
Timeline Packing How many timelines will be packed inside the same file. If 0, no timelines will be exported. No
Extract Includers If true it will generate the .incl file which contains the relationships about includers No
Collapse Template Arguments If true it will collapse all template arguments and aggregate all instances together No
Clang Traces Path (Clang Only) The path to the folder where the .json traces from -ftime-trace. Yes

Macros

Name Description
SolutionDir Opened folder path
SolutionName Solution name (solution exists) or folder name (open folder mode)
Configuration The name of the active configuration
Platform Target Platform name
Generator_OverviewDetail Current Compile Score Generator Overview detail level
Generator_TimelineDetail Current Compile Score Generator Timeline detail level

Examples

One Solution, Multiple Reports

Property Value
Score File Location $(SolutionDir)CompileData\$(Configuration)\compileData.scor
Output File same as Score File Location

This setup will dynamically change when the active configuration changes within Visual Studio or we select a different overview detail in the extension options page.

When generating new profiling data it will overwrite the default one updating it.

Offline processing

Property Value
Score File Location <MyServerPath>\$(Configuration)\compileData.scor
Output File $(SolutionDir)CompileData\MyProfileName.scor

For large codebases where doing a full project profiling would be time consuming. We can perform the profiling in a build server with any sort of automation, store the result in a remote location and the VS extension pull those by default on startup. This allows to be in sync with latest code build information without having to profile locally. In the Score Generator Page there are more details on how to generate the .scor files from the command line.

With this setup, we can still profile locally and get the results as those will be generated in a local folder and shown on demand.

CMake

In a default Visual Studio CMake (Open Folder) setup the configuration should look similar to the following:

Property Value
Score File Location $(SolutionDir)CompileData\$(Configuration)\compileData.scor
Output File same as Score File Location
Clang Traces Path $(SolutionDir)bin\$(Configuration)\CMakeFiles\<CMakeProjectName>.dir