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

23 lines
501 B
C#
Raw Permalink Normal View History

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