Code cleanup and refactor.

This commit is contained in:
2018-07-09 19:57:08 +01:00
parent 9f65fa8d12
commit c109d2c76b
33 changed files with 2789 additions and 3256 deletions

View File

@@ -1,6 +1,6 @@
using BenchmarkDotNet.Attributes;
using System.IO;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Attributes.Jobs;
using System.IO;
namespace Claunia.PropertyList.Benchmark
{
@@ -8,7 +8,7 @@ namespace Claunia.PropertyList.Benchmark
[MemoryDiagnoser]
public class BinaryPropertyListParserBenchmarks
{
private byte[] data = null;
byte[] data;
[GlobalSetup]
public void Setup()
@@ -19,8 +19,8 @@ namespace Claunia.PropertyList.Benchmark
[Benchmark]
public NSObject ReadLargePropertylistTest()
{
var nsObject = PropertyListParser.Parse(this.data);
NSObject nsObject = PropertyListParser.Parse(data);
return nsObject;
}
}
}
}

View File

@@ -7,7 +7,7 @@ namespace Claunia.PropertyList.Benchmark
[MemoryDiagnoser]
public class BinaryPropertyListWriterBenchmarks
{
private NSObject data = null;
NSObject data;
[GlobalSetup]
public void Setup()
@@ -15,11 +15,10 @@ namespace Claunia.PropertyList.Benchmark
data = PropertyListParser.Parse("plist.bin");
}
[Benchmark]
public byte[] WriteLargePropertylistTest()
{
return BinaryPropertyListWriter.WriteToArray(data);
}
}
}
}

View File

@@ -1,5 +1,5 @@
using BenchmarkDotNet.Running;
using System;
using BenchmarkDotNet.Reports;
using BenchmarkDotNet.Running;
namespace Claunia.PropertyList.Benchmark
{
@@ -7,8 +7,8 @@ namespace Claunia.PropertyList.Benchmark
{
static void Main(string[] args)
{
var summary = BenchmarkRunner.Run<BinaryPropertyListParserBenchmarks>();
Summary summary = BenchmarkRunner.Run<BinaryPropertyListParserBenchmarks>();
summary = BenchmarkRunner.Run<BinaryPropertyListWriterBenchmarks>();
}
}
}
}