Skip to content

Commit 73485ff

Browse files
committed
Undo incomplete changes to PsesAnalyzer - for now
1 parent e31f694 commit 73485ff

File tree

2 files changed

+0
-80
lines changed

2 files changed

+0
-80
lines changed

tools/PsesLogAnalyzer/Analyze.ps1

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -164,43 +164,6 @@ function Get-PsesIntelliSenseCompletionTime {
164164
}
165165
}
166166

167-
function Get-PsesRpcQueueMessage {
168-
[CmdletBinding(DefaultParameterSetName = "PsesLogEntry")]
169-
param(
170-
# Specifies a path to one or more PSES EditorServices log files.
171-
[Parameter(Mandatory = $true, Position = 0, ParameterSetName = "Path")]
172-
[Alias("PSPath")]
173-
[ValidateNotNullOrEmpty()]
174-
[string]
175-
$Path,
176-
177-
# Specifies PsesLogEntry objects to analyze.
178-
[Parameter(Mandatory = $true, Position = 0, ParameterSetName = "PsesLogEntry", ValueFromPipeline = $true)]
179-
[ValidateNotNull()]
180-
[psobject[]]
181-
$LogEntry
182-
)
183-
184-
begin {
185-
if ($PSCmdlet.ParameterSetName -eq "Path") {
186-
$logEntries = Parse-PsesLog $Path
187-
}
188-
}
189-
190-
process {
191-
if ($PSCmdlet.ParameterSetName -eq "PsesLogEntry") {
192-
$logEntries = $LogEntry
193-
}
194-
195-
foreach ($entry in $logEntries) {
196-
if (($entry.LogMessageType -eq 'Diagnostic') -and ($entry.Message.Data -match '^\s*Script analysis of.*\[(?<ms>\d+)ms\]\s*$')) {
197-
$elapsedMilliseconds = [int]$matches["ms"]
198-
[PsesLogEntryElapsed]::new($entry, $elapsedMilliseconds)
199-
}
200-
}
201-
}
202-
}
203-
204167
function Get-PsesMessage {
205168
[CmdletBinding(DefaultParameterSetName = "PsesLogEntry")]
206169
param(

tools/PsesLogAnalyzer/Types.ps1

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,6 @@ enum PsesNotificationSource {
2121
Server
2222
}
2323

24-
enum QueueOperation {
25-
Queue
26-
Dequeue
27-
Abandon
28-
}
29-
3024
class PsesLogMessage {
3125
[string]$Data
3226
[int]$DataSize
@@ -61,43 +55,6 @@ class PsesJsonRpcMessage {
6155
}
6256
}
6357

64-
class PsesJsonRpcQueued {
65-
[string]$Name
66-
[int]$Id
67-
[psobject]$Data
68-
[DateTime]$Timestamp
69-
[int]$CurrentQueueDepth
70-
71-
PsesJsonRpcMessage([string]$Name, [int]$Id, [psobject]$Data, [int]$DataSize) {
72-
$this.Name = $Name
73-
$this.Id = $Id
74-
$this.Data = $Data
75-
$this.DataSize = $DataSize
76-
}
77-
78-
[string] ToString() {
79-
return "Name: $($this.Name) Id: $($this.Id), DataSize: $($this.DataSize)"
80-
}
81-
}
82-
83-
class PsesJsonRpcDeueued {
84-
[string]$Name
85-
[int]$Id
86-
[psobject]$Data
87-
[int]$WaitTimeMilliseconds
88-
89-
PsesJsonRpcMessage([string]$Name, [int]$Id, [psobject]$Data, [int]$DataSize) {
90-
$this.Name = $Name
91-
$this.Id = $Id
92-
$this.Data = $Data
93-
$this.DataSize = $DataSize
94-
}
95-
96-
[string] ToString() {
97-
return "Name: $($this.Name) Id: $($this.Id), DataSize: $($this.DataSize)"
98-
}
99-
}
100-
10158
class PsesNotificationMessage {
10259
[string]$Name
10360
[PsesNotificationSource]$Source

0 commit comments

Comments
 (0)