Enterprise Library Test Guide - Willy .Net
Enterprise Library Test Guide - Willy .Net
Enterprise Library Test Guide - Willy .Net
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
184<br />
<strong>Enterprise</strong> <strong>Library</strong> <strong>Test</strong> <strong>Guide</strong><br />
●<br />
●<br />
●<br />
●<br />
The number of elements to remove during scavenging was 10.<br />
The cache storage was both in-memory and a SQL Server database.<br />
The cache size was 2, 000 KB.<br />
The number of elements in the cache was between 900 items and 2,000 items.<br />
Table 2 lists the scenarios for the Caching Application Block. Here is an explanation<br />
of each of the columns:<br />
●<br />
●<br />
●<br />
●<br />
ID. This column lists the ID number for each scenario.<br />
Scenario. This column lists the Caching Application Block scenario being tested.<br />
Users. This column lists the different numbers of users that the tests simulated.<br />
Expiration policy. This column lists the different expiration policies that were<br />
used during the tests.<br />
Table 2: Caching Application Block Scenarios<br />
ID Scenario Users Expiration policy<br />
1 Add an item. 1, 10, 50, 150, Never/Absolute/FileDependency/<br />
300<br />
Extended Format<br />
2 Read an item. 1, 10, 50, 150,<br />
300<br />
3 Remove an item. 1, 10, 50, 150,<br />
300<br />
4 Add and remove an item. 1, 10, 50, 150,<br />
300<br />
5 Add and remove and read an<br />
item.<br />
6 Add and remove and read and<br />
flush an item.<br />
7 Flush an item. 1, 5<br />
1, 10, 50, 150,<br />
300<br />
1, 10, 50, 150,<br />
300<br />
Never/Absolute/FileDependency/<br />
Extended Format<br />
Never/Absolute/FileDependency/<br />
Extended Format<br />
Never/Absolute/FileDependency/<br />
Extended Format<br />
Never/Absolute/FileDependency/<br />
Extended Format<br />
Never/Absolute/FileDependency/<br />
Extended Format<br />
Creating a <strong>Test</strong> Harness<br />
Each iteration of the test should create the CacheManager object so that the cost of<br />
creating the object is included in the performance metrics. In addition, every item in<br />
the cache requires a unique key. For more information, see Generating Unique Keys.<br />
For an example of how to create a test harness, see Building <strong>Test</strong> Harnesses. This section<br />
also contains an example of a Web page for the Caching Application Block test<br />
harness.<br />
Generating Unique Keys<br />
Every item that is added, read, or removed from the cache requires a unique key.<br />
Another way to think of this is that each thread, which represents a virtual user, requires<br />
its own key. The Caching Application Block test increments the key value until