Skip to content

Instantly share code, notes, and snippets.

@johnterickson
Created May 24, 2019 21:29
Show Gist options
  • Save johnterickson/659d2c3348105a8365c2b1960b3de82e to your computer and use it in GitHub Desktop.
Save johnterickson/659d2c3348105a8365c2b1960b3de82e to your computer and use it in GitHub Desktop.
Capture CPU usage in Azure Pipelines
- 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