Spring.Aop/Aop/Framework/ProxyConfig instantiation optimization

This commit is contained in:
bbaia
2009-10-17 12:52:56 +00:00
parent 4890f7f580
commit 52f4cf7ff2
2 changed files with 32 additions and 6 deletions

View File

@@ -21,6 +21,7 @@
#region Imports
using System;
using System.Diagnostics;
using NUnit.Framework;
#endregion
@@ -39,5 +40,22 @@ namespace Spring.Aop.Framework
{
}
#if NET_2_0
[Category("Performance")]
[Test, Explicit]
public void InstantiationPerformance()
{
int iterations = 10000;
Stopwatch watch = Stopwatch.StartNew();
for (int i = 0; i < iterations; i++)
{
new ProxyConfig();
}
watch.Stop();
Console.WriteLine("Instantiation time: {0}ms", watch.ElapsedMilliseconds);
}
#endif
}
}