@ -31,6 +31,7 @@ int main() {
# else
# define __STDC_FORMAT_MACROS
# include <fcntl.h>
# include <inttypes.h>
# include <stdio.h>
# include <stdlib.h>
@ -60,7 +61,12 @@ int main() {
# include "util/mutexlock.h"
# include "util/random.h"
# include "util/string_util.h"
// SyncPoint is not supported in Released Windows Mode.
# if !(defined NDEBUG) || !defined(OS_WIN)
# include "util/sync_point.h"
# endif // !(defined NDEBUG) || !defined(OS_WIN)
# include "util/testutil.h"
# include "utilities/merge_operators.h"
using GFLAGS : : ParseCommandLineFlags ;
@ -1165,6 +1171,8 @@ class StressTest {
ToString ( FLAGS_max_bytes_for_level_multiplier ) , " 1 " , " 2 " ,
} } ,
{ " max_sequential_skip_in_iterations " , { " 4 " , " 8 " , " 12 " } } ,
{ " use_direct_reads " , { " false " , " true " } } ,
{ " use_direct_io_for_flush_and_compaction " , { " false " , " true " } } ,
} ;
options_table_ = std : : move ( options_tbl ) ;
@ -2352,6 +2360,20 @@ int main(int argc, char** argv) {
SetUsageMessage ( std : : string ( " \n USAGE: \n " ) + std : : string ( argv [ 0 ] ) +
" [OPTIONS]... " ) ;
ParseCommandLineFlags ( & argc , & argv , true ) ;
# if !defined(OS_MACOSX) && !defined(OS_WIN) && !defined(OS_SOLARIS) && \
! defined ( OS_AIX )
rocksdb : : SyncPoint : : GetInstance ( ) - > SetCallBack (
" NewWritableFile:O_DIRECT " , [ & ] ( void * arg ) {
int * val = static_cast < int * > ( arg ) ;
* val & = ~ O_DIRECT ;
} ) ;
rocksdb : : SyncPoint : : GetInstance ( ) - > SetCallBack (
" NewRandomAccessFile:O_DIRECT " , [ & ] ( void * arg ) {
int * val = static_cast < int * > ( arg ) ;
* val & = ~ O_DIRECT ;
} ) ;
rocksdb : : SyncPoint : : GetInstance ( ) - > EnableProcessing ( ) ;
# endif
if ( FLAGS_statistics ) {
dbstats = rocksdb : : CreateDBStatistics ( ) ;