This application performs two tests, first it will time how long it takes collectively to create a new CalculateObject, SimpleMath, ComplexMath and Perform the calculation 100,000 times. Then it will run the same test and use only a single set of objects to perform the calculation on. At the conclusion of each test it will display the time the test took in milliseconds. After running the application you should see something similar to the image below:

Depending on your machine configuration the actual timing information will vary. However, its important to note that the time in miliseconds is mainly intended to be used as a comparison point between native .NET and Spring.NET.

Testing Spring.NET

In testing the Spring.NET application we first need to create the spring configuration in the app.config. I've included the snippet from the config including this section.

This context defines not only SimpleMath, ComplexMath and Calculate objects for testing, it also defines several others which are used to test the timing of varying levels of injection. Next, we can jump into the testing Spring.NET application.