Created
September 10, 2019 19:12
-
-
Save michaellwest/caf1d2259fa40129231e1ea43ca8d340 to your computer and use it in GitHub Desktop.
Duplicates the functionality seen in the Sitecore stats.aspx admin page using Sitecore PowerShell Extensions.
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
$items = [Sitecore.Diagnostics.Statistics]::RenderingStatistics | |
$props = @{ | |
Property = @( | |
@{Label="Rendering"; Expression={$_.TraceName} }, | |
@{Label="Site"; Expression={$_.SiteName} }, | |
@{Label="Count"; Expression={$_.RenderCount} }, | |
@{Label="From cache"; Expression={$_.UsedCache} }, | |
@{Label="Avg. time (ms)"; Expression={$_.AverageTime.TotalMilliseconds} }, | |
@{Label="Avg. items"; Expression={$_.AverageItemsAccessed} }, | |
@{Label="Max. time"; Expression={$_.MaxTime.TotalMilliseconds} }, | |
@{Label="Max. items"; Expression={$_.MaxItemsAccessed} }, | |
@{Label="Total time"; Expression={$_.TotalTime} }, | |
@{Label="Total items"; Expression={$_.TotalItemsAccessed} }, | |
@{Label="Last run"; Expression={[Sitecore.DateUtil]::ToServerTime($_.LastRendered)} } | |
) | |
} | |
$items | Sort-Object -Property "SiteName","TraceName" | Show-ListView @props |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment