std_benchmark 0.3.3

Randomized benchmark and unittesting module


To use this package, put the following dependency into your project's dependencies section:

dub.json
dub.sdl
/** This module combines randomized unittests with benchmarking capabilites.

To gain appropriate test coverage and to test unexpected inputs, randomized
unittest are a possible approach.
Additionally, they lend itself for reproducible benchmarking and performance
monitoring.

$(D randomizedtestbenchmark) is a test data generation and benchmark
package. The below example shows a simple example of how to test a function
with this package.
*/

import randomizedtestbenchmark;

bool isPrime(uint a) 
{
	uint ret;
	for (uint i = 2; i < a; ++i)
	{
		if (ret % i == 0) {
			return false;
		}
	}
	return true;
}

/// 
unittest
{
    alias bench = benchmark!(isPrime);
    BenchmarkResult result = bench.execute();
	stdoutPrinter!(Min, Mode, Quantil!0.5, Max)(result);
	gnuplot!(Min, Mode, Quantil!0.5, Max)(result);
}
Authors:
  • Robert burner Schadek
Dependencies:
none
Versions:
0.3.3 2018-Jun-14
0.3.1 2017-Jun-01
0.3.0 2017-May-30
0.2.0 2017-May-04
0.1.2 2017-Feb-04
Show all 16 versions
Download Stats:
  • 0 downloads today

  • 1 downloads this week

  • 2 downloads this month

  • 142 downloads total

Score:
0.9
Short URL:
std_benchmark.dub.pm