public void TestMethodGet() { Stopwatch sw = new Stopwatch(); sw.Start(); SingleController sct = new SingleController(fastdb); for (int i = 0; i < 10000; i++) { var ss= sct.Get(i.ToString()); } sw.Stop(); var tt = sw.Elapsed; }
public void TestMethodPost() { Stopwatch sw = new Stopwatch(); sw.Start(); SingleController sct = new SingleController(fastdb); sct.Post("fff", new testmodel { i = 33, s = "yuyang" }); for (int i = 0; i < 10000; i++) { sct.Post(i.ToString(),new testmodel { i=i,s="yuyang"}); } sw.Stop(); var tt = sw.Elapsed; }