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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Test</strong>ing for Performance and Scalability 235<br />

{<br />

int start = Environment.TickCount;<br />

serializer = new XmlSerializer(typeof(OrderedItem),"ns");<br />

int stop = Environment.TickCount;<br />

Console.WriteLine(" Time create serializer: {0}<br />

milliseconds", stop - start);<br />

}<br />

}<br />

}<br />

If you examine the Visual Studio Team System profiler, you see that although the<br />

code creates the XmlSerializer object 11 times, the program incurs the largest costs<br />

when it first compiles the types inside the XmlSerializer object. After this, subsequent<br />

calls use the compiled version in the cache. Table 28 lists the information from<br />

the profiler.<br />

Table 28: Profiler Information<br />

Method name<br />

Time in ms<br />

Number of<br />

calls<br />

System.Xml.Serialization.XmlSerializer..ctor 795.67 11<br />

System.Xml.Serialization.XmlSerializer.GenerateTempAssembly 645.37 1<br />

System.Xml.Serialization.TempAssembly..ctor 644.42 1<br />

System.Xml.Serialization.TempAssembly.GenerateAssembly 414.6 1<br />

System.Xml.Serialization.Compiler.Compile 281.72 1<br />

Extrapolating Workload Profiles<br />

It is possible to extrapolate workload characterizations for the load tests, even though<br />

you do not know the actual application that will host the application blocks or the<br />

systems on which the application will run.<br />

Defining a load test is one of the steps in writing a performance test plan specification.<br />

The load test runs concurrent scenarios and records a system’s behavior. You<br />

generate a test load by creating virtual users and a simulation that accurately reflects<br />

how actual users use the application.<br />

To characterize a performance test workload, you should associate the number of<br />

concurrent users with the think times that occur between iterations.<br />

When you create a load test for an application, you often have no data about how<br />

many concurrent users there actually will be or the type of computer or network you<br />

need to consider. For example, your load test may be for an application that will actually<br />

run on a single computer with a processor and a disk subsystem or it may run<br />

over an intranet. However, you can use Little’s Law to extrapolate from a given performance<br />

specification or goal and calculate a realistic number of concurrent users.

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

Saved successfully!

Ooh no, something went wrong!