Which code segment should you use?

You are creating an XML Web service named Tracker to track orders for your company. Tracker includes a Web method named OrderStatus for tracking the status of individual orders. You anticipate that many client applications will use the service. You want administrators of Tracker to be able to monitor the requests per second for OrderStatus. Which code segment should you use?

You are creating an XML Web service named Tracker to track orders for your company. Tracker includes a Web method named OrderStatus for tracking the status of individual orders. You anticipate that many client applications will use the service. You want administrators of Tracker to be able to monitor the requests per second for OrderStatus. Which code segment should you use?

A.
PerformanceCounter counter =
new PerformanceCounter(“Tracker”,
“OrderStatus req/sec”, false);

B.
PerformanceCounterCategory.Create(“Tracker”, “category”,
“OrderStatus req/sec”, “req/sec”);

C.
CounterCreationData[] counterData = {
new CounterCreationData(
“OrderStatus req/sec”, “help”,
PerformanceCounterType.RateOfCountsPerSecond32)
};
CounterCreationDataCollection collection = new
CounterCreationDataCollection(counterData);
PerformanceCounterCategory.Create(“Tracker”,
“Tracker performance counters”, collection);

D.
CounterCreationData[] counterData = {
new CounterCreationData(
“Int32”, “second”,
PerformanceCounterType.AverageTimer32)
};
CounterCreationDataCollection collection =
new CounterCreationDataCollection(counterData);
PerformanceCounterCategory.Create(“OrderStatus”,
“requests per second”, collection);



Leave a Reply 0

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