-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathProgram.cs
More file actions
35 lines (30 loc) · 1.26 KB
/
Copy pathProgram.cs
File metadata and controls
35 lines (30 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Reports;
using BenchmarkDotNet.Running;
using Scripting.Tests;
using System;
namespace BenchmarksProject
{
class Program
{
static void Main(string[] args)
{
// STEPS TO RUN THE BENCHMARK:
// * write the code to benchmark in the class "ClassToBenchmark"
// * set STARTUP PROJECT to this project
// * SET BUILD TYPE to "RELEASE"
// * RUN THE PROJECT from VISUAL STUDIO *WITHOUT DEBUG* (with CTRL + F5)
// docs
// from https://benchmarkdotnet.org/articles/overview.html
// https://github.com/dotnet/BenchmarkDotNet/issues/1073
// https://benchmarkdotnet.org/api/BenchmarkDotNet.Configs.ConfigOptions.html
Console.WriteLine("starting");
// Run Benchmark WITH OPTIMIZATION VALIDATOR
//var summary = BenchmarkRunner.Run<ClassToBenchmark>();
// Run Benchmark WITHOUT OPTIMIZATION VALIDATOR (WHATEVER IT MEANS)
var config = DefaultConfig.Instance.With(ConfigOptions.DisableOptimizationsValidator);
Summary summary;
summary = BenchmarkRunner.Run<ObjectCloning_with_Stringify_rfdc_Lodash_Benchmark>(config);
}
}
}