BALL  1.5.0
Macros
Benchmarking of classes.

Macros

#define START_SECTION(name, weight)
 
#define END_SECTION
 
#define STATUS(a)
 
#define START_TIMER    BENCHMARK::timer.start();\
 
#define STOP_TIMER    BENCHMARK::timer.stop();
 
#define START_BENCHMARK(class_name, overall_weight, version)
 
#define END_BENCHMARK
 

Detailed Description

source/BENCHMARKS/Skeleton_bench.C

Macro Definition Documentation

◆ END_BENCHMARK

#define END_BENCHMARK

End of the test program

Definition at line 124 of file benchmark.h.

◆ END_SECTION

#define END_SECTION
Value:
BENCHMARK::timer.stop();\
BENCHMARK::section_time = BENCHMARK::timer.getCPUTime() - BENCHMARK::section_time;\
{\
std::cout << BENCHMARK::section_name << ": " \
<< BENCHMARK::section_time << " s"\
<< " (weight = " << BENCHMARK::section_weight << ")" << std::endl;\
}\
BENCHMARK::total_time += BENCHMARK::section_time * BENCHMARK::section_weight;\

End of a benchmark section.

Definition at line 28 of file benchmark.h.

◆ START_BENCHMARK

#define START_BENCHMARK (   class_name,
  overall_weight,
  version 
)

Program body for the benchmark. The parameter weight determines the overall weight of this test in the accumulated benchmark (BALLStones).

Definition at line 79 of file benchmark.h.

◆ START_SECTION

#define START_SECTION (   name,
  weight 
)
Value:
BENCHMARK::section_time = BENCHMARK::timer.getCPUTime();\
BENCHMARK::section_name = #name;\
BENCHMARK::section_weight = weight;

Start a new benchmark section. The argument weight determines the weighting factor of the section.

Definition at line 19 of file benchmark.h.

◆ START_TIMER

#define START_TIMER    BENCHMARK::timer.start();\

Start the timer. This macro is used to determine the running time of a set of commands. It may be used in benchmarks and requires a prior invocation of the START_BENCHMARK macro. All commands that are between the START_TIMER and the STOP_TIMER command contribute to the overall running time of the benchmark.

Definition at line 59 of file benchmark.h.

◆ STATUS

#define STATUS (   a)
Value:
{\
std::cout << " status: " << a << std::endl;\
}

Status output. Print debugging information if called with -v.

Definition at line 44 of file benchmark.h.

◆ STOP_TIMER

#define STOP_TIMER    BENCHMARK::timer.stop();

Stop the timer. This macro is used to determine the running time of a set of commands. It may be used in benchmarks and requires a prior invocation of the START_BENCHMARK and START_TIMER macros. All commands that are between the START_TIMER and the STOP_TIMER command contribute to the overall running time of the benchmark.

Definition at line 71 of file benchmark.h.

TEST::verbose
int verbose
Definition: classTest.h:18