mirror of
https://github.com/claunia/plist-cil.git
synced 2025-12-16 11:04:26 +00:00
27 lines
583 B
C#
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;
|
|
}
|
|
}
|
|
}
|