benchmark

This function runs the passed callable T for the duration of maxRuntime. It will count how often T is run in the duration and how long each run took to complete.

Unless compiled in release mode, statistics will be printed to stderr. If compiled in release mode the statistics are appended to a file called name.

  1. void benchmark(BenchmarkOptions opts)
  2. void benchmark(string funcname, string filename)
  3. void benchmark(from!"std.datetime".Duration maxRuntime, string filename)
    void
    benchmark
    ()
    (
    from!"std.datetime".Duration maxRuntime
    ,
    string filename = __FILE__
    )
  4. void benchmark(string name, from!"std.datetime".Duration maxRuntime, string filename)

Parameters

maxRuntime from!"std.datetime".Duration

The maximum time the benchmark is executed. The last run will not be interrupted.

Meta