GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — PowerShell/tools/performance at master · powercode/PowerShell

Expand file tree

/

performance

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
 
 
/

performance

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
GC.Regions.xml
GC.Regions.xml
 
 
Invoke-PerfviewPS.ps1
Invoke-PerfviewPS.ps1
 
 
JIT.Regions.xml
JIT.Regions.xml
 
 
PowerShell.Regions.xml
PowerShell.Regions.xml
 
 
PowerShell.stacktags
PowerShell.stacktags
 
 
PowerShell.wpaProfile
PowerShell.wpaProfile
 
 
PowerShell.wprp
PowerShell.wprp
 
 
README.md
README.md
 
 

README.md

Outline

PowerShell Performance Analysis

This directory contains useful scripts and related files for analyzing PowerShell performance.

If you use the Windows Performance Toolkit, you can use the following to collect data and analyze a trace.

$PowerShellGitRepo = "D:\PowerShell"
wpr -start $PowerShellGitRepo\tools\performance\PowerShell.wprp -filemode
pwsh.exe -NoProfile -Command "echo 1"
wpr -stop PowerShellTrace.etl
wpa -i wpa://.\PowerShellTrace.etl?profile=$PowerShellGitRepo\tools\performance\PowerShell.wpaProfile

When wpa opens, under System Activity, you'll find a section "Regions of Interest". With the above wpaProfile, you should see a bunch of PowerShell related regions as well as GC and JIT activity.

If you use PerfView, you can collect a trace by running

Invoke-PerfviewPS.ps1 -scenario { echo 1 }
perfview .\perfviewdata.etl

The etl files collected with perfview or wpr should contain roughly the same events.

Also note that you can collect the trace with one tool and analyze with the other.

Symbols

PDB files are not published for PowerShell Core, so the current recommendation is to build PowerShell yourself passing -CrossGen to Start-Build.

If profiling Windows PowerShell, symbols are generated from GAC. wprui.exe and perfview.exe will both generate the PDB files needed.

Files

File Description
GC.Regions.xml WPA regions of interest for GC
JIT.Regions.xml WPA regions of interest for JIT
PowerShell.Regions.xml WPA regions of interest for PowerShell
PowerShell.stacktags PowerShell stack tags
PowerShell.wpaProfile WPA profile to load regions of interest and stack tags
PowerShell.wprp WPR profile to enable CLR and PowerShell ETW events
Invoke-PerfviewPS.ps1 Script to run perfview and with PowerShell ETW events enabled
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.