Zero  0.1.0
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
KitsCommand Class Reference

#include <kits_cmd.h>

Inheritance diagram for KitsCommand:
Command basethread_t thread_wrapper_t

Public Member Functions

 KitsCommand ()
 
virtual ~KitsCommand ()
 
virtual void setupOptions ()
 
virtual void run ()
 
void mediaFailure (unsigned)
 
void randomRootPageFailure ()
 
void crashFilthy ()
 
bool running ()
 
void set_stop_benchmark (bool)
 
ShoreEnvgetShoreEnv ()
 
- Public Member Functions inherited from Command
po::options_description & getOptions ()
 
void setCommandString (string s)
 
void setOptionValues (po::variables_map &vm)
 
- Public Member Functions inherited from basethread_t
 basethread_t ()
 
virtual ~basethread_t ()
 
- Public Member Functions inherited from thread_wrapper_t
 thread_wrapper_t ()
 
virtual ~thread_wrapper_t ()
 
void spawn ()
 
void fork ()
 
void join ()
 

Protected Member Functions

virtual void loadOptions (sm_options &opt)
 
template<class Client , class Environment >
void runBenchmarkSpec ()
 
void runBenchmark ()
 
virtual void doWork ()
 
template<class Client , class Environment >
void createClients ()
 
void forkClients ()
 
void joinClients ()
 
template<class Environment >
void initShoreEnv ()
 
void init ()
 
void finish ()
 
void mkdirs (string)
 
void ensureEmptyPath (string)
 
void ensureParentPathExists (string)
 
bool runBenchAfterLoad ()
 
- Protected Member Functions inherited from Command
void setupCommonOptions ()
 Options common to all commands (e.g., help and config) More...
 
void helpOption ()
 
- Protected Member Functions inherited from basethread_t
void begin_xct ()
 
void commit_xct ()
 
virtual void before_run ()
 
virtual void after_run ()
 

Protected Attributes

ShoreEnvshoreEnv
 
bool opt_sharpBackup
 
bool opt_load
 
string opt_benchmark
 
string opt_conffile
 
int opt_num_trxs
 
unsigned opt_duration
 
unsigned opt_log_volume
 
bool opt_no_stop
 
int opt_num_threads
 
int opt_select_trx
 
int opt_queried_sf
 
int opt_update_freq
 
bool opt_eager
 
bool opt_skew
 
bool opt_spread
 
bool opt_asyncCommit
 
bool opt_warmup
 
int opt_crashDelay
 
bool opt_crashDelayAfterInit
 
int opt_failDelay
 
int opt_skewShiftDelay
 
bool hasFailed
 
MeasurementType mtype
 
std::shared_ptr< CrashThread< ShoreEnv > > pre_init_crash_thread
 
std::shared_ptr< SkewShiftingThreadskew_shifter
 
- Protected Attributes inherited from Command
po::options_description options
 
po::variables_map optionValues
 
string commandString
 

Private Attributes

std::vector< base_client_t * > clients
 
bool clientsForked
 
FailureThreadfailure_thread
 

Additional Inherited Members

- Static Public Member Functions inherited from Command
static Commandparse (int argc, char **argv)
 
static void init ()
 
static void setupSMOptions (po::options_description &options)
 Options passed down to the storage manager. More...
 
static void setSMOptions (sm_options &sm_opt, const po::variables_map &values)
 
- Static Public Member Functions inherited from basethread_t
static void start_base ()
 
static void start_buffer ()
 
static void start_log (string logdir)
 
static void start_archiver (string archdir, size_t wsize, size_t bsize)
 
static void start_merger (string archdir)
 
static void start_other ()
 
static void print_stats ()
 
- Public Attributes inherited from basethread_t
bool finished
 
- Static Protected Attributes inherited from basethread_t
static sm_options _options
 

Constructor & Destructor Documentation

§ KitsCommand()

KitsCommand::KitsCommand ( )

§ ~KitsCommand()

virtual KitsCommand::~KitsCommand ( )
inlinevirtual

Member Function Documentation

§ crashFilthy()

void KitsCommand::crashFilthy ( )

§ createClients()

template<class Client , class Environment >
void KitsCommand::createClients ( )
protected

§ doWork()

void KitsCommand::doWork ( )
protectedvirtual

§ ensureEmptyPath()

void KitsCommand::ensureEmptyPath ( string  path)
protected

If called on directory, remove all its contents, leaving an empty directory behind.

§ ensureParentPathExists()

void KitsCommand::ensureParentPathExists ( string  path)
protected

Given path should be a file name (e.g., DB file). Ensures that the directory containing the file exists, to avoid OS failures in the SM when creating the file.

§ finish()

void KitsCommand::finish ( )
protected

§ forkClients()

void KitsCommand::forkClients ( )
protected

§ getShoreEnv()

ShoreEnv * KitsCommand::getShoreEnv ( )

§ init()

void KitsCommand::init ( )
protected

§ initShoreEnv()

template<class Environment >
void KitsCommand::initShoreEnv ( )
protected

§ joinClients()

void KitsCommand::joinClients ( )
protected

§ loadOptions()

void KitsCommand::loadOptions ( sm_options opt)
protectedvirtual

§ mediaFailure()

void KitsCommand::mediaFailure ( unsigned  delay)

§ mkdirs()

void KitsCommand::mkdirs ( string  path)
protected

§ randomRootPageFailure()

void KitsCommand::randomRootPageFailure ( )

§ run()

void KitsCommand::run ( )
virtual

Implements Command.

§ runBenchAfterLoad()

bool KitsCommand::runBenchAfterLoad ( )
inlineprotected

§ runBenchmark()

void KitsCommand::runBenchmark ( )
protected

§ runBenchmarkSpec()

template<class Client , class Environment >
void KitsCommand::runBenchmarkSpec ( )
protected

§ running()

bool KitsCommand::running ( )

§ set_stop_benchmark()

void KitsCommand::set_stop_benchmark ( bool  stop)

§ setupOptions()

void KitsCommand::setupOptions ( )
virtual

Implements Command.

Member Data Documentation

§ clients

std::vector<base_client_t*> KitsCommand::clients
private

§ clientsForked

bool KitsCommand::clientsForked
private

§ failure_thread

FailureThread* KitsCommand::failure_thread
private

§ hasFailed

bool KitsCommand::hasFailed
protected

§ mtype

MeasurementType KitsCommand::mtype
protected

§ opt_asyncCommit

bool KitsCommand::opt_asyncCommit
protected

§ opt_benchmark

string KitsCommand::opt_benchmark
protected

§ opt_conffile

string KitsCommand::opt_conffile
protected

§ opt_crashDelay

int KitsCommand::opt_crashDelay
protected

§ opt_crashDelayAfterInit

bool KitsCommand::opt_crashDelayAfterInit
protected

§ opt_duration

unsigned KitsCommand::opt_duration
protected

§ opt_eager

bool KitsCommand::opt_eager
protected

§ opt_failDelay

int KitsCommand::opt_failDelay
protected

§ opt_load

bool KitsCommand::opt_load
protected

§ opt_log_volume

unsigned KitsCommand::opt_log_volume
protected

§ opt_no_stop

bool KitsCommand::opt_no_stop
protected

§ opt_num_threads

int KitsCommand::opt_num_threads
protected

§ opt_num_trxs

int KitsCommand::opt_num_trxs
protected

§ opt_queried_sf

int KitsCommand::opt_queried_sf
protected

§ opt_select_trx

int KitsCommand::opt_select_trx
protected

§ opt_sharpBackup

bool KitsCommand::opt_sharpBackup
protected

§ opt_skew

bool KitsCommand::opt_skew
protected

§ opt_skewShiftDelay

int KitsCommand::opt_skewShiftDelay
protected

§ opt_spread

bool KitsCommand::opt_spread
protected

§ opt_update_freq

int KitsCommand::opt_update_freq
protected

§ opt_warmup

bool KitsCommand::opt_warmup
protected

§ pre_init_crash_thread

std::shared_ptr<CrashThread<ShoreEnv> > KitsCommand::pre_init_crash_thread
protected

§ shoreEnv

ShoreEnv* KitsCommand::shoreEnv
protected

§ skew_shifter

std::shared_ptr<SkewShiftingThread> KitsCommand::skew_shifter
protected

The documentation for this class was generated from the following files: