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