mirror of
https://github.com/isar/libmdbx.git
synced 2024-10-29 23:19:20 +08:00
mdbx: refine testing-jitter, add MDBX_DBG_JITTER.
Change-Id: Ibc3bd8a16626e97aabc2cc544a3803f2e2bc3a10
This commit is contained in:
parent
009618560f
commit
e7ee0bc762
1
mdbx.h
1
mdbx.h
@ -1550,6 +1550,7 @@ LIBMDBX_API MDBX_oom_func *mdbx_env_get_oomfunc(MDBX_env *env);
|
||||
#define MDBX_DBG_TRACE 4
|
||||
#define MDBX_DBG_EXTRA 8
|
||||
#define MDBX_DBG_AUDIT 16
|
||||
#define MDBX_DBG_JITTER 32
|
||||
|
||||
typedef void MDBX_debug_func(int type, const char *function, int line,
|
||||
const char *msg, va_list args);
|
||||
|
@ -792,7 +792,8 @@ void mdbx_panic(const char *fmt, ...)
|
||||
|
||||
static __inline void mdbx_jitter4testing(bool tiny) {
|
||||
#ifndef NDEBUG
|
||||
mdbx_osal_jitter(tiny);
|
||||
if (MDBX_DBG_JITTER & mdbx_runtime_flags)
|
||||
mdbx_osal_jitter(tiny);
|
||||
#else
|
||||
(void)tiny;
|
||||
#endif
|
||||
|
@ -114,7 +114,7 @@ void testcase::db_prepare() {
|
||||
log_trace(">> db_prepare");
|
||||
assert(!db_guard);
|
||||
|
||||
int mdbx_dbg_opts = MDBX_DBG_ASSERT;
|
||||
int mdbx_dbg_opts = MDBX_DBG_ASSERT | MDBX_DBG_JITTER;
|
||||
if (config.params.loglevel <= logging::trace)
|
||||
mdbx_dbg_opts |= MDBX_DBG_TRACE;
|
||||
if (config.params.loglevel <= logging::verbose)
|
||||
|
Loading…
Reference in New Issue
Block a user