Files
MaxScale/server/include/test_utils.h
Markus Makela 743a1b1037 Removed unnecessary calls to atomic_add
The polling statistics collection used atomic_add to increment values. This
is not an optimal way to update statistical values. Moved to per thread
values which are summed up when they are read.

Moved the functions used to gather polling statistics to their own file and
created a specific data type for statistics.
2016-01-28 09:55:26 +02:00

23 lines
403 B
C

#ifndef TEST_UTILS_H
#define TEST_UTILS_H
#include <poll.h>
#include <dcb.h>
#include <housekeeper.h>
#include <maxscale_test.h>
#include <log_manager.h>
#include <statistics.h>
void init_test_env(char *path)
{
int argc = 3;
const char* logdir = path ? path : TEST_LOG_DIR;
ts_stats_init();
mxs_log_init(NULL, logdir, MXS_LOG_TARGET_DEFAULT);
poll_init();
hkinit();
}
#endif