2018-06-20 14:37:33 +02:00
|
|
|
|
using BenchmarkDotNet.Attributes;
|
2021-04-21 13:02:02 +02:00
|
|
|
|
using BenchmarkDotNet.Jobs;
|
2018-06-20 14:37:33 +02:00
|
|
|
|
|
2025-08-07 22:31:12 +01:00
|
|
|
|
namespace Claunia.PropertyList.Benchmark;
|
|
|
|
|
|
|
|
|
|
|
|
[SimpleJob(RuntimeMoniker.NetCoreApp50)]
|
|
|
|
|
|
[MemoryDiagnoser]
|
|
|
|
|
|
public class BinaryPropertyListWriterBenchmarks
|
2018-06-20 14:37:33 +02:00
|
|
|
|
{
|
2025-08-07 22:31:12 +01:00
|
|
|
|
NSObject data;
|
2018-06-20 14:37:33 +02:00
|
|
|
|
|
2025-08-07 22:31:12 +01:00
|
|
|
|
[GlobalSetup]
|
|
|
|
|
|
public void Setup() => data = PropertyListParser.Parse("plist.bin");
|
2018-06-20 14:37:33 +02:00
|
|
|
|
|
2025-08-07 22:31:12 +01:00
|
|
|
|
[Benchmark]
|
|
|
|
|
|
public byte[] WriteLargePropertylistTest() => BinaryPropertyListWriter.WriteToArray(data);
|
2018-07-09 19:57:08 +01:00
|
|
|
|
}
|