Benchmark.Measure

Static Method in Benchmark

Declaration

public static double Measure(Action foo, int iterations, bool log = true)

Description

Measures the execution time of a function with a given amount of iterations.

Parameters

fooThe function to be executed.
iterationsThe amount of times the function is executed.
logLogs the result to the console.

Returns

doubleThe execution time of the function in milliseconds.