You are developing a method named CreateCounters that will create performance counters
for an application.
The method includes the following code. (Line numbers are included for reference only.)
You need to ensure that Counter1 is available for use in Windows Performance Monitor
(PerfMon).
Which code segment should you insert at line 16?
A.
CounterType = PerformanccCounterType.RawBase
B.
CounterType = PerformanceCounterType.AverageBase
C.
CounterType = PerformanceCounterType.SampleBase
D.
CounterType = PerformanceCounterType.CounterMultiBase
Would say C because a counter of type “SampleFraction” needs a base counter in the following code
This can be useful
http://manski.net/2013/11/windows-performance-counter-types/
PerformanceCounterType.SampleBase – A base counter that stores the denominator of a counter that presents a general arithmetic fraction. The sampling fraction is the number of samples that were one (or true) for a sample interrupt. Check that this value is greater than zero before using it as the denominator in a calculation of SampleFraction.
Check Question 62.. the answer is B.
CounterType = PerformanceCounterType.AverageBase
https://msdn.microsoft.com/en-us/library/system.diagnostics.performancecountertype%28v=vs.110%29.aspx