reworked some files skip ci
This commit is contained in:
@@ -46,45 +46,3 @@ class Chronometer
|
||||
}
|
||||
}
|
||||
|
||||
class MonitoredScript
|
||||
{
|
||||
[string]$Path
|
||||
[System.Collections.ArrayList]$Line
|
||||
|
||||
hidden $lastNode = $null
|
||||
hidden $lastRecord = $null
|
||||
|
||||
MonitoredScript()
|
||||
{
|
||||
$this.Line = [System.Collections.ArrayList]::New()
|
||||
}
|
||||
|
||||
[int] SetScript([string]$Path)
|
||||
{
|
||||
Get-Content -Path $Path | %{ $this.Line.Add( [ScriptLine]@{text=$_})}
|
||||
return $this.Line.Count
|
||||
}
|
||||
|
||||
[void] AddExecution([hashtable]$node)
|
||||
{
|
||||
$record = $this.Line[$node.Breakpoint.Line-1]
|
||||
$record.LineNumber = $node.Breakpoint.Line - 1
|
||||
|
||||
if($this.lastNode)
|
||||
{
|
||||
$duration = $node.ElapsedMilliseconds - $this.lastNode.ElapsedMilliseconds
|
||||
}
|
||||
else
|
||||
{
|
||||
$duration = $node.ElapsedMilliseconds
|
||||
}
|
||||
|
||||
if($this.lastRecord)
|
||||
{
|
||||
$this.lastRecord.AddExecutionTime($duration)
|
||||
}
|
||||
|
||||
$this.lastRecord = $record
|
||||
$this.lastNode = $node
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user