Exemplo n.º 1
0
 public static void Main()
 {
     NBench.Benchmark(() => null, "NoJoin");
     NBench.Benchmark(callJoinWithJoin, "JoinWithJoin");
     NBench.Benchmark(callJoinWithBuilder, "JoinWithBuilder");
     NBench.Benchmark(callJoinWithPlus, "JoinWithPlus");
 }
Exemplo n.º 2
0
    public static void Main()
    {
        const long ITER_TIME  = 1000;
        const long NUM_WARMUP = 10;
        const long NUM_ITER   = 10;

        NBench.Benchmark(new BenchmarkMethod(StrBench.noJoin), "noJoin", ITER_TIME, NUM_WARMUP, NUM_ITER);
        NBench.Benchmark(new BenchmarkMethod(StrBench.testJoinWithPlus), "JoinWithPlus", ITER_TIME, NUM_WARMUP, NUM_ITER);
        NBench.Benchmark(new BenchmarkMethod(StrBench.testJoinWithBuilder), "JoinWithBuilder", ITER_TIME, NUM_WARMUP, NUM_ITER);
        NBench.Benchmark(new BenchmarkMethod(StrBench.testJoinWithJoin), "JoinWithJoin", ITER_TIME, NUM_WARMUP, NUM_ITER);
    }