Created
May 31, 2012 19:56
-
-
Save ToJans/2845826 to your computer and use it in GitHub Desktop.
Here is how we track our progress for the performance improvements over at Paycento
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// TJS 2012/05/31 11:05 14 tx/sec | |
[TestMethod] | |
public void CreateSessionKeySpeed() | |
{ | |
// restores a new private MSSQL db from backup and injects it into the self-hosted WCF backend API | |
using (var ApiCtx = new PaycentoAPIContext()) | |
{ | |
// we have access to the db instance as well | |
ApiCtx.RunOnDb(dbconn => { | |
var cmd = dbconn.CreateCommand(); | |
cmd.CommandText = "Update foo set bar=1 where zomg=12"; | |
cmd.ExecuteNonQuery(); | |
}); | |
var conn = new Paycento.MerchantConnector.PaycentoConnect("localhost", false, "application/xml"); | |
// invoke once to fire up service | |
conn.CreateSessionKey(ConsumerKey, ConsumerSecret); | |
var p = new Profiler(MinTxPerSecond: 100, TxTimeOutInMs: 3000, a: () => conn.CreateSessionKey(ConsumerKey, ConsumerSecret)); | |
p.TimedOutJobs.ShouldBe(0); | |
p.InvokesPerSec.ShouldBeGreaterThan(14); | |
p.AverageMsPerTx.ShouldBeLessThan(1500); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment