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 Counter2 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
B. CounterType = PerformanceCounterType.AverageBase;
Right answer is B.
C
Right answer is B.
Correct answer:
B.
CounterType = PerformanceCounterType.AverageBase
B
Can anyone explain why the answer is B ?
Correct B
For more information see this link: https://msdn.microsoft.com/en-us/library/system.diagnostics.performancecountertype%28v=vs.110%29.aspx
Actually B is the right answer,
AverageBase
A base counter that is used in the calculation of time or count averages, such as AverageTimer32 and AverageCount64. Stores the denominator for calculating a counter to present “time per operation” or “count per operation”.
and about c u cant use SampleBase width AverageTimer32 ,
to use SampleBase u need SampleFraction
RawBase RawFraction
https://msdn.microsoft.com/en-us/library/system.diagnostics.performancecountertype(v=vs.110).aspx
C is the right answer !