-Updated version to 6.0.6
-Fixed WinRT build
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -13,13 +14,19 @@ namespace Newtonsoft.Json.TestConsole
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("Json.NET Test Console");
|
||||
|
||||
string version = FileVersionInfo.GetVersionInfo(typeof (JsonConvert).Assembly.Location).FileVersion;
|
||||
Console.WriteLine("Json.NET Version: " + version);
|
||||
Console.ReadKey();
|
||||
|
||||
Console.WriteLine("Doing stuff...");
|
||||
|
||||
//PerformanceTests t = new PerformanceTests();
|
||||
//t.DeserializeLargeJson();
|
||||
|
||||
WriteLargeJson();
|
||||
//DeserializeLargeJson();
|
||||
//WriteLargeJson();
|
||||
DeserializeJson();
|
||||
|
||||
Console.WriteLine();
|
||||
Console.WriteLine("Finished");
|
||||
@@ -27,6 +34,19 @@ namespace Newtonsoft.Json.TestConsole
|
||||
Console.ReadKey();
|
||||
}
|
||||
|
||||
public static void DeserializeJson()
|
||||
{
|
||||
PerformanceTests t = new PerformanceTests();
|
||||
t.Iterations = 50000;
|
||||
t.Deserialize();
|
||||
}
|
||||
|
||||
public static void DeserializeLargeJson()
|
||||
{
|
||||
PerformanceTests t = new PerformanceTests();
|
||||
t.DeserializeLargeJson();
|
||||
}
|
||||
|
||||
public static void WriteLargeJson()
|
||||
{
|
||||
var json = System.IO.File.ReadAllText("large.json");
|
||||
@@ -35,6 +55,10 @@ namespace Newtonsoft.Json.TestConsole
|
||||
|
||||
Console.WriteLine("Press any key to start serialize");
|
||||
Console.ReadKey();
|
||||
Console.WriteLine("Serializing...");
|
||||
|
||||
Stopwatch sw = new Stopwatch();
|
||||
sw.Start();
|
||||
|
||||
for (int i = 0; i < 100; i++)
|
||||
{
|
||||
@@ -45,6 +69,10 @@ namespace Newtonsoft.Json.TestConsole
|
||||
serializer.Serialize(file, o);
|
||||
}
|
||||
}
|
||||
|
||||
sw.Stop();
|
||||
|
||||
Console.WriteLine("Finished. Total seconds: " + sw.Elapsed.TotalSeconds);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user