From 2ab1058c097d81efcfc2a0fec0e1554972652ac7 Mon Sep 17 00:00:00 2001 From: Scott Lyons Date: Tue, 14 Mar 2017 11:15:56 -0700 Subject: [PATCH] Updating perf counter instance name matching When creating perf counters with instances the input was not matching any existing instances as the category was reporting them in lower case. --- .../ProcessInstanceNameCache.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.Diagnostics.EventFlow.Inputs.PerformanceCounter/ProcessInstanceNameCache.cs b/src/Microsoft.Diagnostics.EventFlow.Inputs.PerformanceCounter/ProcessInstanceNameCache.cs index 7e6c42ea..6a08a08d 100644 --- a/src/Microsoft.Diagnostics.EventFlow.Inputs.PerformanceCounter/ProcessInstanceNameCache.cs +++ b/src/Microsoft.Diagnostics.EventFlow.Inputs.PerformanceCounter/ProcessInstanceNameCache.cs @@ -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)