File benchmark_common.hh

Common tools for benchmarking.

License:

License BSD-3-Clause

Author

Vincent Berenz

Copyright

Copyright (c) 2019, New York University and Max Planck Gesellschaft.

Date

2019-05-22

Defines

SHARED_MEMORY_SIZE
SIZE
NUMBER_OR_MEASURED_ITERATIONS
MAX_NUNMBER_OF_ITERATION

Typedefs

typedef std::chrono::high_resolution_clock::time_point TimeType

Functions

static std::vector< double > DATA (SIZE, 2)
static std::string SHM_NAME ("stress_test")
static std::string SHM_OBJECT_NAME ("stress_object")
std::ostream &operator<<(std::ostream &os, const MeasureTime &time)
void init_benchmark()
void code_to_benchamrk()
void end_benchmark()

Variables

bool RUNNING
struct MeasureTime

Public Functions

inline MeasureTime()
inline void start()
inline void update()

Public Members

TimeType tic_
TimeType prev_tic_
double frequency_
double period_

Friends

friend std::ostream &operator<<(std::ostream &os, const MeasureTime &dt)