Skip to content

Commit

Permalink
Merge pull request #565 from microsoft/main
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
bill-long authored Apr 28, 2021
2 parents d189e64 + 23b46c6 commit bcf8ec1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Performance/SimplePerf.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ begin {
}
}

$counters = (Get-Counter -ListSet * | Sort-Object CounterSetName).CounterSetName
$counters = (Get-Counter -ListSet * | Sort-Object CounterSetName)

$defaultIncludeList = @(
"^.NET CLR .+",
Expand All @@ -132,13 +132,13 @@ begin {
"^VM Processor"
)

$countersFiltered = $defaultIncludeList | ForEach-Object { $regexString = $_; $counters | Where-Object { $_ -match $regexString } } | Select-Object -Unique

if ($IncludeThread) {
$countersFiltered += "Thread"
$defaultIncludeList += "^Thread"
}

$counterFullNames = $countersFiltered | ForEach-Object { ("\\localhost\" + $_ + "\*") }
$countersFiltered = $defaultIncludeList | ForEach-Object { $regexString = $_; $counters | Where-Object { $_.CounterSetName -match $regexString } }

$counterFullNames = $countersFiltered | ForEach-Object { ("\\localhost\" + $_.CounterSetName + $(if ($_.CounterSetType -eq "MultiInstance") { "(*)" } else { "" }) + "\*") }

$counterFile = (Join-Path $env:TEMP "counters.txt")

Expand Down

0 comments on commit bcf8ec1

Please sign in to comment.