mirror of
https://github.com/claunia/plist-cil.git
synced 2025-12-16 11:04:26 +00:00
26 lines
587 B
C#
26 lines
587 B
C#
using BenchmarkDotNet.Attributes;
|
|
using BenchmarkDotNet.Jobs;
|
|
using System.IO;
|
|
|
|
namespace Claunia.PropertyList.Benchmark
|
|
{
|
|
[SimpleJob(RuntimeMoniker.NetCoreApp50)]
|
|
[MemoryDiagnoser]
|
|
public class BinaryPropertyListParserBenchmarks
|
|
{
|
|
byte[] data;
|
|
|
|
[GlobalSetup]
|
|
public void Setup()
|
|
{
|
|
data = File.ReadAllBytes("plist.bin");
|
|
}
|
|
|
|
[Benchmark]
|
|
public NSObject ReadLargePropertylistTest()
|
|
{
|
|
NSObject nsObject = PropertyListParser.Parse(data);
|
|
return nsObject;
|
|
}
|
|
}
|
|
} |