Skip to content

Commit

Permalink
Ensure Memory usage and measurements are exported
Browse files Browse the repository at this point in the history
Signed-off-by: Ayase Minori <ayane@vignetteapp.org>
  • Loading branch information
sr229 committed Mar 30, 2024
1 parent 6c4654b commit c2e0505
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion Mediapipe.Net.Benchmarks/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,23 @@
// This file is part of MediaPipe.NET.
// MediaPipe.NET is licensed under the MIT License. See LICENSE for details.

using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Diagnosers;
using BenchmarkDotNet.Exporters;
using BenchmarkDotNet.Exporters.Csv;
using BenchmarkDotNet.Running;

namespace Mediapipe.Net.Benchmarks
{
public class Config : ManualConfig
{
public Config()
{
AddDiagnoser(MemoryDiagnoser.Default);
AddExporter(CsvMeasurementsExporter.Default);
AddExporter(PlainExporter.Default);
}
}
public class Program
{
public static void Main(string[] args)
Expand All @@ -15,7 +28,7 @@ public static void Main(string[] args)
typeof(FloatPacketPerformanceBenchmark), typeof(ImageFramePacketPerformanceBenchmark)
});

switcher.Run(args);
switcher.Run(args, new Config());
}
}
}

0 comments on commit c2e0505

Please sign in to comment.