PrepAway - Latest Free Exam Questions & Answers

Which of the following actions should you take FIRST?

You work as a developer at ABC.com. The ABC.com network consists of a single domain named
ABC.com.
You have been tasked with creating an application that processes numerous objects in a single
second. You want to include a performance counter to examine these processes.
Which of the following actions should you take FIRST?

PrepAway - Latest Free Exam Questions & Answers

A.
You should consider writing code that passes the collection to the Create() method of the
PerformanceCounterCategory.

B.
You should consider writing code that creates a CounterCreationDataCollection.

C.
You should consider writing code thatevokes the Create() method of the
PerformanceCounterCategory class.

D.
You should consider writing code that creates counters as CounterCreationData objects.

Explanation:

5 Comments on “Which of the following actions should you take FIRST?

  1. bob says:

    Answer is B or D or C. I prefer B as one of the PerformanceCounterCategory.Create overloads needs the CounterCreationDataCollection as the last parameter it is logical to create the CounterCreationDataCollection first. But in this example by Microsoft, they do D by creating the CounterCreationData objects before the CounterCreationDataCollection then the PerfromanceCounterCategory.Create!
    Or am I missing something in the question?




    0



    0
  2. j says:

    B

    CounterCreationDataCollection counters = new CounterCreationDataCollection();

    CounterCreationData totalOrders = new CounterCreationData();
    totalOrders.CounterName = “# Orders”;
    totalOrders.CounterHelp = “Total number of orders placed”;
    totalOrders.CounterType = PerformanceCounterType.NumberOfItems32;
    counters.Add(totalOrders);

    CounterCreationData ordersPerSecond = new CounterCreationData();
    ordersPerSecond.CounterName = “# Orders/Sec”;
    ordersPerSecond.CounterHelp = “Number of orders placed per second”;
    ordersPerSecond.CounterType = PerformanceCounterType.RateOfCountsPerSecond32;
    counters.Add(ordersPerSecond);

    PerformanceCounterCategory.Create(“FourthCoffeeOrders”, “A custom category for demonstration”, PerformanceCounterCategoryType.SingleInstance, counters);




    3



    0

Leave a Reply