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

23 lines
554 B
C#
Raw Normal View History

using System.IO;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Jobs;
2018-06-19 11:16:14 +02:00
namespace Claunia.PropertyList.Benchmark
{
[SimpleJob(RuntimeMoniker.NetCoreApp50), MemoryDiagnoser]
2018-06-19 11:16:14 +02:00
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");
2018-06-19 11:16:14 +02:00
[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
}