PrepAway - Latest Free Exam Questions & Answers

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?

PrepAway - Latest Free Exam Questions & Answers

A.
CounterType = PerformanccCounterType.RawBase

B.
CounterType = PerformanceCounterType.AverageBase

C.
CounterType = PerformanceCounterType.SampleBase

D.
CounterType = PerformanceCounterType.CounterMultiBase

11 Comments on “Which code segment should you insert at line 16?

    1. ivannathan says:

      some counters requires to be followed by base counters and some are not.
      AverageTimer requires to be followed by AverageBase counter

      … and CounterMultiTimer (and some other) requires to be followed by CounterMultiBase

      Since we have AverageTimer here, it must be followed by AverageBase




      4



      0
  1. Othman Dahbi-Skali says:

    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




    1



    0

Leave a Reply