@@ -2,7 +2,7 @@
|
|||||||
class ScriptLine
|
class ScriptLine
|
||||||
{
|
{
|
||||||
[float] $Milliseconds = 0
|
[float] $Milliseconds = 0
|
||||||
[float] $HitCount = 0
|
[float] $HitCount = 0
|
||||||
[float] $Min = [float]::MaxValue
|
[float] $Min = [float]::MaxValue
|
||||||
[float] $Max = [float]::MinValue
|
[float] $Max = [float]::MinValue
|
||||||
[float] $Average = 0
|
[float] $Average = 0
|
||||||
@@ -10,6 +10,7 @@ class ScriptLine
|
|||||||
[string] $Path
|
[string] $Path
|
||||||
[string] $Text
|
[string] $Text
|
||||||
|
|
||||||
|
|
||||||
[void]AddExecutionTime([float]$Milliseconds)
|
[void]AddExecutionTime([float]$Milliseconds)
|
||||||
{
|
{
|
||||||
$this.Milliseconds += $Milliseconds
|
$this.Milliseconds += $Milliseconds
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ function Get-Chronometer
|
|||||||
[CmdletBinding()]
|
[CmdletBinding()]
|
||||||
param(
|
param(
|
||||||
# Script file to measure execution times on
|
# Script file to measure execution times on
|
||||||
|
[Parameter(Position=0)]
|
||||||
[string[]]
|
[string[]]
|
||||||
$Path,
|
$Path,
|
||||||
|
|
||||||
@@ -20,6 +21,7 @@ function Get-Chronometer
|
|||||||
$LineNumber = $null,
|
$LineNumber = $null,
|
||||||
|
|
||||||
# The script to start the scrupt or execute other commands
|
# The script to start the scrupt or execute other commands
|
||||||
|
[Parameter(Position=1)]
|
||||||
[alias('Script','CommandScript')]
|
[alias('Script','CommandScript')]
|
||||||
[scriptblock]
|
[scriptblock]
|
||||||
$ScriptBlock
|
$ScriptBlock
|
||||||
|
|||||||
Reference in New Issue
Block a user