CsCheck/Causal.cs
/// <summary>Run causal profiling on a the code in action using gen input data for a number of iterations or time.</summary>
/// <param name="gen">The input data generator.</param>
/// <param name="action">The code to be causal profiled.</param>
/// <param name="iter">The number of iteration to collect statistics.</param>
/// <param name="time">The number of seconds to collect statistics.</param>
Run causal profiling on a the code in action using gen input data for a number of iterations or time.
Run causal profiling on a the code in action using gen input data for a number of iterations or time .
public static Result Profile<T>(this Gen<T> gen, Action<T> action, long iter = -1, int time = -1)
        {
            var pcg = PCG.ThreadPCG;
            return Profile(() => action(gen.Generate(pcg, null, out _)), iter, time);
        }
public static Result Profile < T > ( this Gen < T > gen , Action < T > action , long iter = - 1 , int time = - 1 ) { var pcg = PCG . ThreadPCG ; return Profile ( ( ) => action ( gen . Generate ( pcg , null , out _ ) ) , iter , time ) ; }
Run causal profiling on a the code in action using gen input data for a number of iterations or time.
Run causal profiling on a the code in action using gen input data for a number of iterations or time .
Gen<T>
this
action
Action<T>
The code to be causal profiled.
The code to be causal profiled .
iter
long
The number of iteration to collect statistics.
The number of iteration to collect statistics .
time
int
The number of seconds to collect statistics.
The number of seconds to collect statistics .
gen
The input data generator.
The input data generator .