Files
plist-cil/plist-cil.benchmark/BinaryPropertyListParserBenchmarks.cs

26 lines
587 B
C#
Raw Normal View History

using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Jobs;
using System.IO;
2018-06-19 11:16:14 +02:00
namespace Claunia.PropertyList.Benchmark
{
[SimpleJob(RuntimeMoniker.NetCoreApp50)]
2018-06-19 11:16:14 +02:00
[MemoryDiagnoser]
public class BinaryPropertyListParserBenchmarks
{
2018-07-09 19:57:08 +01:00
byte[] data;
2018-06-19 11:16:14 +02:00
[GlobalSetup]
public void Setup()
{
data = File.ReadAllBytes("plist.bin");
}
[Benchmark]
public NSObject ReadLargePropertylistTest()
{
2018-07-09 19:57:08 +01:00
NSObject nsObject = PropertyListParser.Parse(data);
2018-06-19 11:16:14 +02:00
return nsObject;
}
}
2018-07-09 19:57:08 +01:00
}