Which code segment should you insert at line 16?

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?

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



Leave a Reply 9

Your email address will not be published. Required fields are marked *


Neha

Neha

B. CounterType = PerformanceCounterType.AverageBase;
Right answer is B.

Leonardo

Leonardo

Right answer is B.

sandip

sandip

Correct answer:
B.
CounterType = PerformanceCounterType.AverageBase

Ron

Ron

Can anyone explain why the answer is B ?

Othman Dahbi-Skali

Othman Dahbi-Skali

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

Boubaker Echieb

Boubaker Echieb

C is the right answer !