Which three actions should you perform in sequence?

Posted by: Pdfprep Category: 70-483 Tags: , ,

DRAG DROP

You are developing an application by using C#. The application will process several objects per second.

You need to create a performance counter to analyze the object processing.

Which three actions should you perform in sequence? (To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.)

Answer:

Explanation:

CounterCreationDataCollection counterDataCollection = new CounterCreationDataCollection(); // Box1

// Add the counter. Box 1

CounterCreationData averageCount64 = new CounterCreationData();

averageCount64.CounterType = PerformanceCounterType.AverageCount64;

averageCount64.CounterName = "AverageCounter64Sample";

counterDataCollection.Add(averageCount64);

// Add the base counter.

CounterCreationData averageCount64Base = new CounterCreationData();

averageCount64Base.CounterType = PerformanceCounterType.AverageBase;

averageCount64Base.CounterName = "AverageCounter64SampleBase";

counterDataCollection.Add(averageCount64Base); // Box 2

// Create the category. Box 3

PerformanceCounterCategory.Create("AverageCounter64SampleCategory",

"Demonstrates usage of the AverageCounter64 performance counter type.",

PerformanceCounterCategoryType.SingleInstance, counterDataCollection);

Leave a Reply

Your email address will not be published.