-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Expand file tree
/
Copy pathIntroTagColumn.cs
More file actions
36 lines (31 loc) · 936 Bytes
/
IntroTagColumn.cs
File metadata and controls
36 lines (31 loc) · 936 Bytes
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
using System.Threading;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Columns;
using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Jobs;
namespace BenchmarkDotNet.Samples
{
// You can add custom tags per each method using Columns
[Config(typeof(Config))]
[UseLocalJobOnly]
public class IntroTagColumn
{
private class Config : ManualConfig
{
public Config()
{
AddJob(Job.Dry);
AddColumn(new TagColumn("Kind", name => name.Substring(0, 3)));
AddColumn(new TagColumn("Number", name => name.Substring(3)));
}
}
[Benchmark]
public void Foo1() => Thread.Sleep(10);
[Benchmark]
public void Foo12() => Thread.Sleep(10);
[Benchmark]
public void Bar3() => Thread.Sleep(10);
[Benchmark]
public void Bar34() => Thread.Sleep(10);
}
}