This repository was archived by the owner on Dec 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 860
Expand file tree
/
Copy pathProgram.cs
More file actions
39 lines (37 loc) · 1.29 KB
/
Program.cs
File metadata and controls
39 lines (37 loc) · 1.29 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
using BenchmarkDotNet.Running;
using System.Threading.Tasks;
using System;
namespace ServiceStack.Redis.Benchmark
{
class Program
{
#if DEBUG
static async Task Main()
{
var obj = new IncrBenchmarks();
try
{
await obj.Setup(false);
Console.WriteLine(obj.SERedisIncrSync());
Console.WriteLine(await obj.SERedisIncrAsync());
Console.WriteLine(await obj.SERedisPipelineIncrAsync());
Console.WriteLine(await obj.SERedisTransactionIncrAsync());
Console.WriteLine(await obj.SERedisTransactionIncrSync());
Console.WriteLine(obj.SSRedisIncrSync());
Console.WriteLine(obj.SSRedisPipelineIncrSync());
Console.WriteLine(obj.SSRedisTransactionIncrSync());
Console.WriteLine(await obj.SSRedisIncrAsync());
Console.WriteLine(await obj.SSRedisPipelineIncrAsync());
Console.WriteLine(await obj.SSRedisTransactionIncrAsync());
}
finally
{
await obj.Teardown();
}
}
#else
static void Main(string[] args)
=> BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(args);
#endif
}
}