mirror of
https://github.com/claunia/plist-cil.git
synced 2025-12-16 11:04:26 +00:00
Code cleanup and refactor.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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>();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user