summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.Test
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-11-02 17:51:37 -0800
committerAndrew Arnott <andrewarnott@gmail.com>2009-11-02 17:51:37 -0800
commit53b7f5b56325ce0dcddc3f8574f0a3105c39d0e6 (patch)
treefb8cad0130b9ef7fe6cfe66e26cc16256713c179 /src/DotNetOpenAuth.Test
parentb1cbd4b7a27a9fa02c9a99225336e609a7df5e86 (diff)
downloadDotNetOpenAuth-53b7f5b56325ce0dcddc3f8574f0a3105c39d0e6.zip
DotNetOpenAuth-53b7f5b56325ce0dcddc3f8574f0a3105c39d0e6.tar.gz
DotNetOpenAuth-53b7f5b56325ce0dcddc3f8574f0a3105c39d0e6.tar.bz2
Added more perf reporting for perf unit tests.
Diffstat (limited to 'src/DotNetOpenAuth.Test')
-rw-r--r--src/DotNetOpenAuth.Test/OpenId/Provider/PerformanceTests.cs10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/DotNetOpenAuth.Test/OpenId/Provider/PerformanceTests.cs b/src/DotNetOpenAuth.Test/OpenId/Provider/PerformanceTests.cs
index 4ab9fc3..9f4727d 100644
--- a/src/DotNetOpenAuth.Test/OpenId/Provider/PerformanceTests.cs
+++ b/src/DotNetOpenAuth.Test/OpenId/Provider/PerformanceTests.cs
@@ -53,7 +53,7 @@ namespace DotNetOpenAuth.Test.OpenId.Provider {
timer.Stop();
double executionsPerSecond = GetExecutionsPerSecond(iterations, timer);
TestContext.WriteLine("Created {0} associations in {1}, or {2} per second.", iterations, timer.Elapsed, executionsPerSecond);
- Assert.IsTrue(executionsPerSecond >= 2, "Too slow");
+ Assert.IsTrue(executionsPerSecond >= 2, "Too slow ({0} >= 2 executions per second required.)", executionsPerSecond);
}
[TestMethod]
@@ -70,7 +70,7 @@ namespace DotNetOpenAuth.Test.OpenId.Provider {
timer.Stop();
double executionsPerSecond = GetExecutionsPerSecond(iterations, timer);
TestContext.WriteLine("Created {0} associations in {1}, or {2} per second.", iterations, timer.Elapsed, executionsPerSecond);
- Assert.IsTrue(executionsPerSecond > 1000, "Too slow.");
+ Assert.IsTrue(executionsPerSecond > 1000, "Too slow ({0} > 1000 executions per second required.)", executionsPerSecond);
}
[TestMethod]
@@ -78,7 +78,8 @@ namespace DotNetOpenAuth.Test.OpenId.Provider {
Protocol protocol = Protocol.Default;
string assocType = protocol.Args.SignatureAlgorithm.HMAC_SHA1;
double executionsPerSecond = this.ParameterizedCheckIdTest(protocol, assocType);
- Assert.IsTrue(executionsPerSecond > 500, "Too slow");
+ TestContext.WriteLine("{0} executions per second.", executionsPerSecond);
+ Assert.IsTrue(executionsPerSecond > 500, "Too slow ({0} > 500 executions per second required.)", executionsPerSecond);
}
[TestMethod]
@@ -86,7 +87,8 @@ namespace DotNetOpenAuth.Test.OpenId.Provider {
Protocol protocol = Protocol.Default;
string assocType = protocol.Args.SignatureAlgorithm.HMAC_SHA256;
double executionsPerSecond = this.ParameterizedCheckIdTest(protocol, assocType);
- Assert.IsTrue(executionsPerSecond > 400, "Too slow");
+ TestContext.WriteLine("{0} executions per second.", executionsPerSecond);
+ Assert.IsTrue(executionsPerSecond > 400, "Too slow ({0} > 400 executions per second required.)", executionsPerSecond);
}
private static double GetExecutionsPerSecond(int iterations, Stopwatch timer) {