Repository navigation
Expand file tree
/
Copy pathProgram.cs
More file actions
58 lines (57 loc) · 2.02 KB
/
Copy pathProgram.cs
File metadata and controls
58 lines (57 loc) · 2.02 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
using BenchmarkDotNet.Running;
using System;
using NetJSON.Benchmark.Net5_0.Models;
using static System.Console;
namespace NetJSON.Benchmark.Net5_0
{
static class Program
{
static void Main(string[] args)
{
WriteLine("1. Simple object");
WriteLine("2. GUID");
WriteLine("3. Int32 values");
WriteLine("4. Single values");
WriteLine("5. Double values");
WriteLine("6. String dictionary");
WriteLine("7. String-object dictionary");
WriteLine("8. Int32-object");
WriteLine("9. String-object");
WriteLine("Type the benchmark number and press Enter key: ");
if (Int32.TryParse(ReadLine(), out int index)) {
switch (index) {
case 1:
BenchmarkRunner.Run<SimpleObjectBenchmark>();
return;
case 2:
BenchmarkRunner.Run<GuidBenchmark>();
return;
case 3:
BenchmarkRunner.Run<Int32ArrayBenchmark>();
return;
case 4:
BenchmarkRunner.Run<SingleArrayBenchmark>();
return;
case 5:
BenchmarkRunner.Run<DoubleArrayBenchmark>();
return;
case 6:
BenchmarkRunner.Run<StringDictionaryBenchmark>();
return;
case 7:
BenchmarkRunner.Run<StringObjectDictionaryBenchmark>();
return;
case 8:
BenchmarkRunner.Run<Int32Benchmark>();
BenchmarkRunner.Run<BoxedInt32Benchmark>();
return;
case 9:
BenchmarkRunner.Run<StringObjectBenchmark>();
return;
default:
break;
}
}
}
}
}