| | | 1 | | // See https://aka.ms/new-console-template for more information |
| | | 2 | | |
| | | 3 | | using BenchmarkDotNet.Reports; |
| | | 4 | | using BenchmarkDotNet.Configs; |
| | | 5 | | using BenchmarkDotNet.Jobs; |
| | | 6 | | using BenchmarkDotNet.Running; |
| | | 7 | | using PointCloud.Benchmark.Benchmarks.Filter; |
| | | 8 | | using PointCloud.Benchmark.Benchmarks.Interactivity; |
| | | 9 | | using PointCloud.Benchmark.Benchmarks.IteratePointCloud; |
| | | 10 | | using PointCloud.Benchmark.Benchmarks.UpdatePointCloud; |
| | | 11 | | |
| | | 12 | | namespace PointCloud.Benchmark; |
| | | 13 | | |
| | | 14 | | public class Program |
| | | 15 | | { |
| | | 16 | | public static void Main(string[] args) |
| | 0 | 17 | | { |
| | 0 | 18 | | if (args.Contains("--observer-comparison")) |
| | 0 | 19 | | { |
| | 0 | 20 | | BenchmarkSwitcher.FromTypes(new[] { typeof(ObserverExtremumComparison), typeof(ObserverSmoothingComparison) |
| | 0 | 21 | | .Run(args.Where(arg => arg != "--observer-comparison").ToArray(), |
| | 0 | 22 | | BenchmarkDotNet.Configs.DefaultConfig.Instance.AddJob( |
| | 0 | 23 | | BenchmarkDotNet.Jobs.Job.ShortRun.WithToolchain( |
| | 0 | 24 | | BenchmarkDotNet.Toolchains.InProcess.Emit.InProcessEmitToolchain.Instance))); |
| | 0 | 25 | | return; |
| | | 26 | | } |
| | | 27 | | // var summary1 = BenchmarkBoxFilter(); |
| | | 28 | | // |
| | | 29 | | // var summary2 = BenchmarkIteration1(); |
| | | 30 | | |
| | | 31 | | // var summary3 = BenchmarkIteration2(); |
| | | 32 | | |
| | | 33 | | // var summary4 = BenchmarkUpdate(); |
| | | 34 | | |
| | | 35 | | // var summary5 = BenchmarkCopy(); |
| | | 36 | | |
| | | 37 | | // var summary6 = BenchmarkInteractions(); |
| | | 38 | | |
| | 0 | 39 | | var summary7 = BenchmarkConfidenceFilter(); |
| | | 40 | | |
| | 0 | 41 | | } |
| | | 42 | | |
| | 0 | 43 | | private static Summary BenchmarkBoxFilter() => BenchmarkRunner.Run<BoxBlur>(); |
| | | 44 | | |
| | 0 | 45 | | private static Summary BenchmarkIteration1() => BenchmarkRunner.Run<IterationMethods>(); |
| | | 46 | | |
| | 0 | 47 | | private static Summary BenchmarkIteration2() => BenchmarkRunner.Run<IterationMethods2>(); |
| | | 48 | | |
| | 0 | 49 | | private static Summary BenchmarkUpdate() => BenchmarkRunner.Run<UpdateMethods>(); |
| | | 50 | | |
| | 0 | 51 | | private static Summary BenchmarkCopy() => BenchmarkRunner.Run<CopyPointCloud>(); |
| | | 52 | | |
| | 0 | 53 | | private static Summary BenchmarkInteractions() => BenchmarkRunner.Run<MultiInteractionObserverBenchmark>(); |
| | | 54 | | |
| | 0 | 55 | | private static Summary BenchmarkConfidenceFilter() => BenchmarkRunner.Run<ConfidenceFilterBenchmark>(); |
| | | 56 | | |
| | | 57 | | } |