exam questions

Exam 70-483 All Questions

View all questions & answers for the 70-483 exam

Exam 70-483 topic 1 question 58 discussion

Actual exam question from Microsoft's 70-483
Question #: 58
Topic #: 1
[All 70-483 Questions]

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 = PerformanceCounterType.RawBase
  • B. CounterType = PerformanceCounterType.AverageBase
  • C. CounterType = PerformanceCounterType.SampleBase
  • D. CounterType = PerformanceCounterType.CounterMultiBase
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️
PerformanceCounterType.AverageTimer32 - An average counter that measures the time it takes, on average, to complete a process or operation. Counters of this type display a ratio of the total elapsed time of the sample interval to the number of processes or operations completed during that time. This counter type measures time in ticks of the system clock. Formula: ((N 1 -N 0)/F)/(B 1 -B 0), where N 1 and N 0 are performance counter readings, B 1 and B 0 are their corresponding AverageBase values, and F is the number of ticks per second. The value of F is factored into the equation so that the result can be displayed in seconds.
Thus, the numerator represents the numbers of ticks counted during the last sample interval, F represents the frequency of the ticks, and the denominator represents the number of operations completed during the last sample interval. Counters of this type include PhysicalDisk\ Avg. Disk sec/Transfer.
PerformanceCounterType.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".
References: http://msdn.microsoft.com/en-us/library/system.diagnostics.performancecountertype.aspx

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
patoyanez
Highly Voted 6 years, 4 months ago
it's B
upvoted 29 times
...
natsk8freak
Highly Voted 5 years, 6 months ago
I thought I was losing my mind. It's definitely B.
upvoted 9 times
...
noussa
Most Recent 4 years, 5 months ago
B is correct. For clarity there was a question talking about SampleBase, so please don't be confused like I was: It's simple if you refer to the code in the example line 09 you will find the Type of PerformanceCounter that u should look to, to know which type to use. In the previous question it was SampleBase because line 09 contained: SampleFraction as PerformanceCounterType, thus, SampleBase was the right answer cause it contains SampleFraction. But for this question, it's AverageBase because at line 09 the PerformanceCounterType is AverageTimer32 which is a part of AverageBase along with AverageTimer64. For more info about the types, please refer to the MS docs: https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.performancecountertype?view=dotnet-plat-ext-5.0
upvoted 4 times
...
AB88
4 years, 6 months ago
Why not C? In Question 30 the answer is C, the only difference is there they ask for Counter1 and not Counter2. You need to ensure that Counter1 is available for use in Windows Performance Monitor (PerfMon). Which code segment should you insert at line 16? C. CounterType = PerformanceCounterType.SampleBase Please correct me.
upvoted 3 times
noussa
4 years, 5 months ago
SampleBase : A base counter that stores the number of sampling interrupts taken and is used as a denominator in the sampling fraction. The sampling fraction is the number of samples that were 1 (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. It's not really used to measure the time it takes, on average, to complete a process or operation. but AverageBase yes. So B is correct.
upvoted 1 times
...
...
mohmou
4 years, 11 months ago
B is definitely correct: AverageBase 1073939458 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". https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.performancecountertype?view=dotnet-plat-ext-3.1
upvoted 2 times
...
tanujgyan
5 years, 2 months ago
It is B the base counter should match the counter
upvoted 3 times
...
dominikeps
5 years, 5 months ago
damn i was going nuts. its B
upvoted 7 times
...
Gods_Kenny
5 years, 7 months ago
Correct answer should be B
upvoted 7 times
...
dakuan
5 years, 7 months ago
Correct answer is B
upvoted 7 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...