Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
20
Task/Rate-counter/PowerShell/rate-counter.psh
Normal file
20
Task/Rate-counter/PowerShell/rate-counter.psh
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
[datetime]$start = Get-Date
|
||||
|
||||
[int]$count = 3
|
||||
|
||||
[timespan[]]$times = for ($i = 0; $i -lt $count; $i++)
|
||||
{
|
||||
Measure-Command {0..999999 | Out-Null}
|
||||
}
|
||||
|
||||
[datetime]$end = Get-Date
|
||||
|
||||
$rate = [PSCustomObject]@{
|
||||
StartTime = $start
|
||||
EndTime = $end
|
||||
Duration = ($end - $start).TotalSeconds
|
||||
TimesRun = $count
|
||||
AverageRunTime = ($times.TotalSeconds | Measure-Object -Average).Average
|
||||
}
|
||||
|
||||
$rate | Format-List
|
||||
Loading…
Add table
Add a link
Reference in a new issue