Files
plist-cil/plist-cil.benchmark/BinaryPropertyListParserBenchmarks.cs
Frederik Carlier c8f762da73 Add benchmarks
2018-06-19 11:23:46 +02:00

27 lines
583 B
C#

using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Attributes.Jobs;
using System.IO;
namespace Claunia.PropertyList.Benchmark
{
[CoreJob]
[MemoryDiagnoser]
public class BinaryPropertyListParserBenchmarks
{
private byte[] data = null;
[GlobalSetup]
public void Setup()
{
data = File.ReadAllBytes("plist.bin");
}
[Benchmark]
public NSObject ReadLargePropertylistTest()
{
var nsObject = PropertyListParser.Parse(this.data);
return nsObject;
}
}
}