BEAST - Free Software Audio Synthesizer and Tracker  0.10.0
Macros
sfitests.hh File Reference
#include <sfi/sfi.hh>
#include <rapicorn-test.hh>

Go to the source code of this file.

Macros

#define TICK()
 
#define TACK()
 
#define _(x)
 
#define Q_(x)
 
#define N_(x)
 
#define U_(x)
 
#define TEST_CALIBRATION(target_ms, CODE)
 Macro for test repetitions needed to benchmark in the order of milliseconds. More...
 

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.