Skip to content

Commit

Permalink
performancecounter: fix panic with counter names having brackets
Browse files Browse the repository at this point in the history
Signed-off-by: Jan-Otto Kröpke <[email protected]>
  • Loading branch information
jkroepke committed Dec 27, 2024
1 parent 4e652ad commit d979357
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,10 @@ windows_performancecounter_processor_information_processor_time\{core="0,0",stat
},
{
name: "counter with spaces and brackets",
object: "User Input Delay per Session",
object: "invalid",
instances: nil,
buildErr: pdh.NewPdhError(pdh.CstatusNoCounter).Error(),
counters: []performancecounter.Counter{{Name: "Max Session Input Delay (ms)", Type: "counter"}},
buildErr: pdh.NewPdhError(pdh.CstatusNoObject).Error(),
counters: []performancecounter.Counter{{Name: "Total Memory Usage --- Non-Paged Pool", Type: "counter"}, {Name: "Max Session Input Delay (ms)", Type: "counter"}},
expectedMetrics: nil,
},
} {
Expand Down

0 comments on commit d979357

Please sign in to comment.