Home > Articles > Programming > Windows Programming

  • Print
  • + Share This
From the author of

The Tests

If you're like me, you like reading about performance tests. Therefore, in this series of articles, I run a couple of tests to compare the different data containers. The test cases used are the following:

  • Read one row

  • Read many rows

  • Read one master row and many detail rows

The test cases will all be run under the following circumstances:

  • A single user

  • Five concurrent users (without think time and, therefore, simulating many users)

Finally, all test cases, both with a single user and with five users, will be run in these cases:

  • In an AppDomain

  • Cross-machines

All test cases are end-to-end—that is, the data containers are filled with data from the database for each call (you saw an example of that in Listing 1). Then the data containers are transferred to a client, which inspects all values by moving them to local variables (an example of that was shown in Listing 2).

The test cases are exposed with one service layer class per data container. For example, you can see the DataReader service-layer class in Figure 2.

Figure 2Figure 2 One example of a service-layer class.


By "service layer," I mean the same as the business facade layer, or the application layer, or what other term you prefer.

As you can see in Figure 2, all the service-layer classes inherit from MarshalByRefObject. This is because they should be suitable as root classes when used via remoting.

All service-layer classes call the same three stored procedures:

  • Order_Fetch. Used for the first test case. Fetches one specific order.

  • Order_FetchLines. Used for the second test case. Fetches the detail lines for a specific order.

  • Order_FetchWithLines. Used for the third test case. Fetches the main information about a specific order and its detail lines.

Finally, the stored procedures access the database shown in Figure 3.

Figure 3Figure 3 Database schema.

  • + Share This
  • 🔖 Save To Your Account