terminal/src/cascadia/Remoting
Michael Niksa 7dadde5dd6
Implement PGO in pipelines for AMD64 architecture; supply training test scenarios (#10071)
Implement PGO in pipelines for AMD64 architecture; supply training test scenarios

## References
- #3075 - Relevant to speed interests there and other linked issues.

## PR Checklist
* [x] Closes #6963
* [x] I work here.
* [x] New UIA Tests added and passed. Manual build runs also tested.

## Detailed Description of the Pull Request / Additional comments
- Creates a new pipeline run for creating instrumented binaries for Profile Guided Optimization (PGO).
- Creates a new suite of UIA tests on the full Windows Terminal app to run PGO training scenarios on instrumented binaries (and incidentally can be used to write other UIA tests later for the full Terminal app.)
- Creates a new NuGet artifact to store trained PGO databases (PGD files) at `Microsoft.Internal.Windows.Terminal.PGODatabase`
- Creates a new NuGet artifact to supply large-scale test content for automated tests at `Microsoft.Internal.Windows.Terminal.TestContent`
- Adjusts the release pipeline to run binaries in PGO optimized mode where content from PGO databases is leveraged at link time to optimize the final release build

The following binaries are trained:
- OpenConsole.exe
- WindowsTerminal.exe
- TerminalApp.dll
- TerminalConnection.dll
- Microsoft.Terminal.Control.dll
- Microsoft.Terminal.Remoting.dll
- Microsoft.Terminal.Settings.Editor.dll
- Microsoft.Terminal.Settings.Model.dll

In the future, adding `<PgoTarget>true</PgoTarget>` to a new `vcxproj` file will automatically enroll the DLL/EXE for PGO instrumentation and optimization going forward.

Two training test scenarios are implemented:
- Smoke test the Terminal by just opening it and typing a bit of text then exiting. (Should help focus on the standard launch path.)
- Optimize bulk text output by launching terminal, outputting `big.txt`, then exiting.

Additional scenarios can be contributed to the `WindowsTerminal_UIATests` project with the `[TestProperty("IsPGO", "true")]` annotation to add them to the suite of scenarios for PGO.

**NOTE:** There are currently no weights applied to the various test scenarios. We will revisit that in the future when/if necessary.

## Validation Steps Performed
- [x] - Training run completed at https://dev.azure.com/ms/terminal/_build?definitionId=492&_a=summary
- [x] - Optimization run completed locally (by forcing `PGOBuildMode` to `Optimize` on my local machine, manually retrieving the databases with NuGet, and building).
- [x] - Validated locally that x86 and ARM64 do not get trained and automatically skip optimization as databases are not present for them.
- [x] - Smoke tested optimized binary versus latest releases. `big.txt` output through CMD is ~11-12seconds prior to PGO and just over 8 seconds with PGO.
2021-05-13 21:12:30 +00:00
..
dll Implement PGO in pipelines for AMD64 architecture; supply training test scenarios (#10071) 2021-05-13 21:12:30 +00:00
Resources/en-US Add Microsoft.Terminal.Remoting.dll (#8607) 2021-01-07 22:59:37 +00:00
CommandlineArgs.cpp Add support for running a commandline in another WT window (#8898) 2021-02-10 11:28:09 +00:00
CommandlineArgs.h Add support for running a commandline in another WT window (#8898) 2021-02-10 11:28:09 +00:00
FindTargetWindowArgs.cpp Add support for running a commandline in another WT window (#8898) 2021-02-10 11:28:09 +00:00
FindTargetWindowArgs.h Add support for naming windows with the -w parameter (#9300) 2021-03-17 19:28:01 +00:00
init.cpp Add support for running a commandline in another WT window (#8898) 2021-02-10 11:28:09 +00:00
Microsoft.Terminal.RemotingLib.vcxproj Add desktop param to globalSummon; set _quake = toCurrent (#9954) 2021-04-28 17:25:48 -05:00
Monarch.cpp Add desktop param to globalSummon; set _quake = toCurrent (#9954) 2021-04-28 17:25:48 -05:00
Monarch.h Add globalSummon action (#9854) 2021-04-28 17:13:28 -05:00
Monarch.idl Add desktop param to globalSummon; set _quake = toCurrent (#9954) 2021-04-28 17:25:48 -05:00
MonarchFactory.h Add Microsoft.Terminal.Remoting.dll (#8607) 2021-01-07 22:59:37 +00:00
packages.config Update C++/WinRT to 2.0.210309.3 (#9437) 2021-03-10 16:04:59 -06:00
pch.cpp Add Microsoft.Terminal.Remoting.dll (#8607) 2021-01-07 22:59:37 +00:00
pch.h Add support for the windowingBehavior setting (#9118) 2021-02-19 21:09:17 +00:00
Peasant.cpp When the window is summoned and is already active, minimize it. (#9963) 2021-04-28 18:57:14 -05:00
Peasant.h Add desktop param to globalSummon; set _quake = toCurrent (#9954) 2021-04-28 17:25:48 -05:00
Peasant.idl When the window is summoned and is already active, minimize it. (#9963) 2021-04-28 18:57:14 -05:00
ProposeCommandlineResult.cpp Add support for running a commandline in another WT window (#8898) 2021-02-10 11:28:09 +00:00
ProposeCommandlineResult.h Add support for naming windows with the -w parameter (#9300) 2021-03-17 19:28:01 +00:00
RenameRequestArgs.cpp Add support for renaming windows (#9662) 2021-04-02 16:00:04 +00:00
RenameRequestArgs.h Add support for renaming windows (#9662) 2021-04-02 16:00:04 +00:00
SummonWindowBehavior.cpp Add desktop param to globalSummon; set _quake = toCurrent (#9954) 2021-04-28 17:25:48 -05:00
SummonWindowBehavior.h When the window is summoned and is already active, minimize it. (#9963) 2021-04-28 18:57:14 -05:00
SummonWindowSelectionArgs.cpp Add globalSummon action (#9854) 2021-04-28 17:13:28 -05:00
SummonWindowSelectionArgs.h Add desktop param to globalSummon; set _quake = toCurrent (#9954) 2021-04-28 17:25:48 -05:00
WindowActivatedArgs.cpp Add support for running a commandline in another WT window (#8898) 2021-02-10 11:28:09 +00:00
WindowActivatedArgs.h Update C++/WinRT to 2.0.210309.3 (#9437) 2021-03-10 16:04:59 -06:00
WindowManager.cpp Add globalSummon action (#9854) 2021-04-28 17:13:28 -05:00
WindowManager.h Add globalSummon action (#9854) 2021-04-28 17:13:28 -05:00
WindowManager.idl Add globalSummon action (#9854) 2021-04-28 17:13:28 -05:00