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
|
|
|
|
|
|
|
|
|
|
namespace Claunia.PropertyList.Benchmark
|
|
|
|
|
|
{
|
2021-04-30 13:06:04 +01:00
|
|
|
|
[SimpleJob(RuntimeMoniker.NetCoreApp50), MemoryDiagnoser]
|
2018-06-20 14:37:33 +02:00
|
|
|
|
public class BinaryPropertyListWriterBenchmarks
|
|
|
|
|
|
{
|
2018-07-09 19:57:08 +01:00
|
|
|
|
NSObject data;
|
2018-06-20 14:37:33 +02:00
|
|
|
|
|
|
|
|
|
|
[GlobalSetup]
|
2021-04-30 13:06:04 +01:00
|
|
|
|
public void Setup() => data = PropertyListParser.Parse("plist.bin");
|
2018-06-20 14:37:33 +02:00
|
|
|
|
|
|
|
|
|
|
[Benchmark]
|
2021-04-30 13:06:04 +01:00
|
|
|
|
public byte[] WriteLargePropertylistTest() => BinaryPropertyListWriter.WriteToArray(data);
|
2018-06-20 14:37:33 +02:00
|
|
|
|
}
|
2018-07-09 19:57:08 +01:00
|
|
|
|
}
|