07.11.2014 Views

Enterprise Library Test Guide - Willy .Net

Enterprise Library Test Guide - Willy .Net

Enterprise Library Test Guide - Willy .Net

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

192<br />

<strong>Enterprise</strong> <strong>Library</strong> <strong>Test</strong> <strong>Guide</strong><br />

ID Scenario <strong>Test</strong> code<br />

3 Log to WMI trace listener. protected void WMI<strong>Test</strong>_Click(object sender,<br />

EventArgs e)<br />

{<br />

LogEntry logEntry = new LogEntry();<br />

// Create a new event.<br />

EventDetails eventDetails = new EventDetails();<br />

// Set the event details.<br />

eventDetails.Message = "<strong>Test</strong> WMIin .NET<br />

Framework";<br />

eventDetails.Guid = Guid.NewGuid().To-<br />

String();<br />

eventDetails.Type = 2;<br />

Instrumentation.Fire(eventDetails);<br />

}<br />

EventDetails class<br />

[InstrumentationClass(InstrumentationType.<br />

Event)]<br />

public class EventDetails<br />

{<br />

public string Message;<br />

public string Guid;<br />

public int Type;<br />

}<br />

Profiling the Workload<br />

The number of users increases over time. The number of users was 1, 10, 50, 150, and<br />

300. There was no test mix and there was no think time.<br />

Setting Up the Load <strong>Test</strong><br />

The load test simulates many clients accessing the application block at the same time.<br />

Use the information in the workload profile to set the load test parameters. For more<br />

information, see Creating a Load <strong>Test</strong>.<br />

Recording Baseline and Application Block Metrics<br />

The baseline tests are a subset of the Logging Application Block performance tests.<br />

The objective is to compare the following overhead costs:<br />

●<br />

●<br />

The cost of using the Logging Application Block Event Log trace listener with the<br />

costs of using <strong>Enterprise</strong> <strong>Library</strong> 1.1 and the .NET Framework to write to the<br />

system event log.<br />

The cost of using the Logging Application Block WMI trace listener against the<br />

costs of using <strong>Enterprise</strong> <strong>Library</strong> 1.1 and the .NET Framework WMI events.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!