Skip to content

Commit

Permalink
Updating perf counter instance name matching
Browse files Browse the repository at this point in the history
When creating perf counters with instances the input was not matching any existing instances as the category was reporting them in lower case.
  • Loading branch information
slyons authored and karolz-ms committed Mar 14, 2017
1 parent 15b52f2 commit 2ab1058
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public string GetCounterInstanceNameForCurrentProcess(PerformanceCounterConfigur
PerformanceCounterCategory category = new PerformanceCounterCategory(counterConfiguration.ProcessIdCounterCategory);

string[] processInstanceNames = category.GetInstanceNames()
.Where(inst => inst.StartsWith(currentProcess.ProcessName))
.Where(inst => inst.ToLowerInvariant().StartsWith(currentProcess.ProcessName.ToLowerInvariant()))
.ToArray();

foreach (string processInstanceName in processInstanceNames)
Expand Down

0 comments on commit 2ab1058

Please sign in to comment.