in src/MSBuild/XMake.cs [408:461]
private static string GetFriendlyCounterType(PerformanceCounterType type, string name)
{
if (name.IndexOf("bytes", StringComparison.OrdinalIgnoreCase) != -1)
{
return "bytes";
}
if (name.IndexOf("threads", StringComparison.OrdinalIgnoreCase) != -1)
{
return "threads";
}
switch (type)
{
case PerformanceCounterType.ElapsedTime:
case PerformanceCounterType.AverageTimer32:
return "s";
case PerformanceCounterType.Timer100Ns:
case PerformanceCounterType.Timer100NsInverse:
return "100ns";
case PerformanceCounterType.SampleCounter:
case PerformanceCounterType.AverageCount64:
case PerformanceCounterType.NumberOfItems32:
case PerformanceCounterType.NumberOfItems64:
case PerformanceCounterType.NumberOfItemsHEX32:
case PerformanceCounterType.NumberOfItemsHEX64:
case PerformanceCounterType.RateOfCountsPerSecond32:
case PerformanceCounterType.RateOfCountsPerSecond64:
case PerformanceCounterType.CountPerTimeInterval32:
case PerformanceCounterType.CountPerTimeInterval64:
case PerformanceCounterType.CounterTimer:
case PerformanceCounterType.CounterTimerInverse:
case PerformanceCounterType.CounterMultiTimer:
case PerformanceCounterType.CounterMultiTimerInverse:
case PerformanceCounterType.CounterDelta32:
case PerformanceCounterType.CounterDelta64:
return "#";
case PerformanceCounterType.CounterMultiTimer100Ns:
case PerformanceCounterType.CounterMultiTimer100NsInverse:
case PerformanceCounterType.RawFraction:
case PerformanceCounterType.SampleFraction:
return "%";
case PerformanceCounterType.AverageBase:
case PerformanceCounterType.RawBase:
case PerformanceCounterType.SampleBase:
case PerformanceCounterType.CounterMultiBase:
default:
return "?";
}
}