Last active
March 28, 2016 21:08
-
-
Save jbw/998ad17d8fbcdbf37905 to your computer and use it in GitHub Desktop.
This file contains 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
static List<long> RunSerializer(IJsonSerializer jsonSerializer, int iterations, TestObj testObj) | |
{ | |
var timing = new List<long>(); | |
var sw = new Stopwatch(); | |
for (int i = 0; i < iterations; i++) | |
{ | |
sw.Start(); | |
var serialised = jsonSerializer.SerializeToString(testObj); | |
sw.Stop(); | |
timing.Add(sw.ElapsedTicks); | |
sw.Reset(); | |
} | |
return timing; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment