Beast - Music Synthesizer and Composer  0.11.1+10.g2da35
sfitests.hh File Reference
#include <sfi/sfi.hh>
#include <rapicorn-test.hh>
Include dependency graph for sfitests.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define TICK()
 
#define TACK()
 
#define TEST_CALIBRATION(target_ms, CODE)
 

Functions

template<class... Args>
void test_error (const char *format, const Args &...args)
 

Macro Definition Documentation

#define TEST_CALIBRATION (   target_ms,
  CODE 
)

Macro for test repetitions needed to benchmark in the order of milliseconds.

TEST_CALIBRATION() - This macro is used to calculate the number of repetitions needed for execution of a test routine, so that the total duration is long enough to be measured by a timer with millisecond resolution like gettimeofday(). Given an upper test duration bound, this macro will return the number of inner loop repetitions needed for benchmarking a piece of code. Estimated run time: the calibration process should take somewhat less than MIN (max_calibration_time, (target_ms * 2 * 7)) milliseconds.

  • target_ms - expected total test runtime for RUNS * dups * testfunc_time
  • max_calibration_time - expected upper bound for test calibration runtime In this macro, "dups" is calculated appropriately for max_calibration_time, and scaled upon return to match target_ms accordingly.

Function Documentation

template<class... Args>
void test_error ( const char format,
const Args &...  args 
)

Issue a printf-like message and abort the program with a breakpoint.

Here is the call graph for this function: