Created
May 24, 2019 21:29
-
-
Save johnterickson/659d2c3348105a8365c2b1960b3de82e to your computer and use it in GitHub Desktop.
Capture CPU usage in Azure Pipelines
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- script: | | |
mkdir %CD%\trace | |
- script: | | |
logman create counter BuildCounters -si 00:05 -f csv -o %CD%\trace\perf.csv | |
- script: | | |
logman update BuildCounters -c "\Processor(_Total)\%% Processor Time" | |
- script: | | |
logman start BuildCounters | |
# do stuff | |
- script: | | |
logman stop BuildCounters | |
- task: PublishBuildArtifacts@1 | |
inputs: | |
PathtoPublish: 'trace' | |
ArtifactName: "trace $(System.JobDisplayName)" | |
publishLocation: 'Container' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment