Example #1
0
 public BenchmarkTarget(Type type, MethodInfo method, string description = null)
 {
     Type = type;
     Method = method;
     OperationsPerInvoke = method.ResolveAttribute<OperationsPerInvokeAttribute>()?.Count ?? 1;
     Description = description ?? Caption;
 }
 public BenchmarkTarget(Type type, MethodInfo method, MethodInfo setupMethod = null, string description = null, string additionalLogic = null)
 {
     Type = type;
     Method = method;
     SetupMethod = setupMethod;
     OperationsPerInvoke = method.ResolveAttribute<OperationsPerInvokeAttribute>()?.Count ?? 1;
     AdditionalLogic = additionalLogic ?? string.Empty;
     Description = description ?? Caption;
 }
 public BenchmarkTarget(Type type, MethodInfo method, MethodInfo setupMethod = null, 
                        string description = null, string additionalLogic = null, bool baseline = false)
 {
     Type = type;
     Method = method;
     SetupMethod = setupMethod;
     OperationsPerInvoke = method.ResolveAttribute<OperationsPerInvokeAttribute>()?.Count ?? 1;
     AdditionalLogic = additionalLogic ?? string.Empty;
     Description = description ?? Caption;
     MethodTitle = description ?? method?.Name ?? "Untitled";
     Baseline = baseline;
 }