Leverage C++ Build Insights SDK to get interesting data from your MSVC builds.
Previous screenshots were obtained by analyzing a Rebuild
on CppBuildAnalyzer
in a Debug|x64
configuration, within Visual Studio 16.4 (Visual Studio 2019). You can check the files here (they were edited to remove local paths):
Requisites:
To collect a trace:
vcperf /start SomeSessionName
.
vcperf /start /level3 SomeSessionName
instead.vcperf /stopnoanalyze SomeSessionName TraceFile.etl
.To analyze a trace:
CppBuildAnalyzer -i TraceFile.etl --analyze_all
.Required:
-i, --input arg Path to trace file
--analyze_all Perform all analysis the program can do
Optional:
-h, --help Show help
--analyze_function_compilations Analyzes function compilations (i.e. how long did each one take)
--analyze_file_inclusion_times Analyzes file inclusion times (i.e. how long did each one take)
--analyze_file_inclusion_graph Creates a file inclusion graph (i.e. directed graph from include clauses)
--analyze_file_compilations Analyzes file compilations (i.e. how long did front-end and back-end take)
--analyze_build_timeline Analyzes trace and creates a timeline from it
--analyze_template_instantiations Analyzes template instantiations (i.e. how long did each template take to instantiate)
--timeline_ignore_functions_under arg Ignores all functions under the given milliseconds
--timeline_ignore_templates_under arg Ignores all templates under the given milliseconds
--out_function_compilations arg Path to output function compilations data
--out_file_inclusion_times arg Path to output file inclusion times
--out_file_inclusion_graph arg Path to output file inclusion graph
--out_file_compilations arg Path to output file compilations data
--out_build_timeline arg Path to output build timeline
--out_template_instantiations arg Path to output template instantiations data
This project is released under GNU GPLv3 license.
I started this project thanks to the information I gathered from the community, so I wanted to give something back. You are encouraged to alter it in any way you want, but please continue making it public so the community can benefit from it.