Skip to content

Commit d5465e9

Browse files
committed
Undo incomplete changes to PsesAnalyzer - for now
1 parent 1199c7f commit d5465e9

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
@@ -257,43 +257,6 @@ function Get-PsesIntelliSenseCompletionTime {
257257
}
258258
}
259259

260-
function Get-PsesRpcQueueMessage {
261-
[CmdletBinding(DefaultParameterSetName = "PsesLogEntry")]
262-
param(
263-
# Specifies a path to one or more PSES EditorServices log files.
264-
[Parameter(Mandatory = $true, Position = 0, ParameterSetName = "Path")]
265-
[Alias("PSPath")]
266-
[ValidateNotNullOrEmpty()]
267-
[string]
268-
$Path,
269-
270-
# Specifies PsesLogEntry objects to analyze.
271-
[Parameter(Mandatory = $true, Position = 0, ParameterSetName = "PsesLogEntry", ValueFromPipeline = $true)]
272-
[ValidateNotNull()]
273-
[psobject[]]
274-
$LogEntry
275-
)
276-
277-
begin {
278-
if ($PSCmdlet.ParameterSetName -eq "Path") {
279-
$logEntries = Parse-PsesLog $Path
280-
}
281-
}
282-
283-
process {
284-
if ($PSCmdlet.ParameterSetName -eq "PsesLogEntry") {
285-
$logEntries = $LogEntry
286-
}
287-
288-
foreach ($entry in $logEntries) {
289-
if (($entry.LogMessageType -eq 'Diagnostic') -and ($entry.Message.Data -match '^\s*Script analysis of.*\[(?<ms>\d+)ms\]\s*$')) {
290-
$elapsedMilliseconds = [int]$matches["ms"]
291-
[PsesLogEntryElapsed]::new($entry, $elapsedMilliseconds)
292-
}
293-
}
294-
}
295-
}
296-
297260
function Get-PsesMessage {
298261
[CmdletBinding(DefaultParameterSetName = "PsesLogEntry")]
299262
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)