Zero  0.1.0
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
tpcc::ShoreTPCCEnv Class Reference

#include <tpcc_env.h>

Inheritance diagram for tpcc::ShoreTPCCEnv:
ShoreEnv db_iface

Classes

class  table_builder_t
 
struct  table_creator_t
 

Public Types

typedef std::map< pthread_t, ShoreTPCCTrxStats * > statmap_t
 
- Public Types inherited from ShoreEnv
typedef std::map< string, string > ParamMap
 
typedef trx_request_t Request
 
typedef blob_pool RequestStack
 
typedef trx_worker_t Worker
 
typedef trx_worker_tWorkerPtr
 
typedef std::vector< WorkerPtrWorkerPool
 
typedef std::vector< WorkerPtr >::iterator WorkerIt
 
- Public Types inherited from db_iface
typedef map< string, string > envVarMap
 
typedef envVarMap::iterator envVarIt
 
typedef envVarMap::const_iterator envVarConstIt
 

Public Member Functions

 ShoreTPCCEnv (boost::program_options::variables_map map)
 
virtual ~ShoreTPCCEnv ()
 
virtual int set (envVarMap *)
 
virtual int open ()
 
virtual int pause ()
 
virtual int resume ()
 
virtual w_rc_t newrun ()
 
virtual int post_init ()
 
virtual w_rc_t load_schema ()
 
virtual w_rc_t load_and_register_fids ()
 
virtual int conf ()
 
virtual int start ()
 
virtual int stop ()
 
virtual int info () const
 
virtual int statistics ()
 
int dump ()
 
virtual void print_throughput (const double iQueriedSF, const int iSpread, const int iNumOfThreads, const double delay)
 
w_rc_t create_tables ()
 
w_rc_t load_data ()
 
w_rc_t warmup ()
 
w_rc_t check_consistency ()
 
 DECLARE_TABLE (warehouse_t, warehouse_man_impl, warehouse)
 
 DECLARE_TABLE (district_t, district_man_impl, district)
 
 DECLARE_TABLE (customer_t, customer_man_impl, customer)
 
 DECLARE_TABLE (history_t, history_man_impl, history)
 
 DECLARE_TABLE (new_order_t, new_order_man_impl, new_order)
 
 DECLARE_TABLE (order_t, order_man_impl, order)
 
 DECLARE_TABLE (order_line_t, order_line_man_impl, order_line)
 
 DECLARE_TABLE (item_t, item_man_impl, item)
 
 DECLARE_TABLE (stock_t, stock_man_impl, stock)
 
w_rc_t run_one_xct (Request *prequest)
 
 DECLARE_TRX (new_order)
 
 DECLARE_TRX (payment)
 
 DECLARE_TRX (order_status)
 
 DECLARE_TRX (delivery)
 
 DECLARE_TRX (stock_level)
 
 DECLARE_TRX (mbench_wh)
 
 DECLARE_TRX (mbench_cust)
 
 DECLARE_TRX (populate_baseline)
 
 DECLARE_TRX (populate_one_unit)
 
w_rc_t _xct_delivery_helper (const int xct_id, delivery_input_t &pdin, std::vector< int > &dlist, int &d_id, const bool SPLIT_TRX)
 
virtual void env_thread_init ()
 
virtual void env_thread_fini ()
 
virtual void reset_stats ()
 
ShoreTPCCTrxStats _get_stats ()
 
void set_skew (int area, int load, int start_imbalance, int skew_type, bool shifting)
 
void start_load_imbalance ()
 
void reset_skew ()
 
w_rc_t db_print (int lines)
 
virtual w_rc_t db_fetch ()
 
- Public Member Functions inherited from ShoreEnv
 ShoreEnv (po::variables_map &vm)
 
virtual ~ShoreEnv ()
 
sm_optionsget_opts ()
 
po::variables_map & get_optionValues ()
 
virtual int init ()
 
virtual int close ()
 
virtual int restart ()
 
ss_mdb ()
 
bool is_initialized ()
 
bool is_loaded ()
 
w_rc_t load ()
 
void set_measure (const MeasurementState aMeasurementState)
 
MeasurementState get_measure ()
 
bool should_stop_benchmark ()
 
void set_stop_benchmark (bool v)
 
pthread_mutex_t * get_init_mutex ()
 
pthread_mutex_t * get_vol_mutex ()
 
pthread_mutex_t * get_load_mutex ()
 
bool get_init_no_cs ()
 
bool get_loaded_no_cs ()
 
void set_init_no_cs (const bool b_is_init)
 
void set_loaded_no_cs (const bool b_is_loaded)
 
void set_clobber (bool c)
 
void set_loaders (int l)
 
void set_qf (const double aQF)
 
double get_qf () const
 
void set_sf (const double aSF)
 
double get_sf () const
 
void print_sf () const
 
virtual w_rc_t update_partitioning ()
 
void set_freqs (int insert_freq=0, int delete_freq=0, int probe_freq=0, int update_freq=0)
 
void set_chkpt_freq (int)
 
int get_chkpt_freq ()
 
void set_archiver_opts (bool, bool)
 
bool is_archiver_enabled ()
 
bool is_merger_enabled ()
 
void set_activation_delay (int d)
 
int get_activation_delay ()
 
void set_crash_delay (int)
 
int get_crash_delay ()
 
void set_sm_shudown_filthy (bool)
 
uint upd_worker_cnt ()
 
trx_worker_tworker (const uint idx)
 
int disable_fake_disk_latency ()
 
int enable_fake_disk_latency (const int adelay)
 
void gatherstats_sm (ostream &)
 
int checkpoint ()
 
void activate_archiver ()
 
void wait_for_warmup ()
 
string sysname ()
 
env_stats_tget_env_stats ()
 
size_t get_total_pages_to_recover ()
 
size_t get_dirty_page_count ()
 
bool has_log_analysis_finished ()
 
size_t get_total_pages_to_restore ()
 
size_t get_num_restored_pages ()
 
unsigned get_trx_att () const
 
unsigned get_trx_com () const
 
void inc_trx_att ()
 
void inc_trx_com ()
 
bool isAsynchCommit () const
 
void setAsynchCommit (const bool bAsynch)
 
bool isSLIEnabled () const
 
void setSLIEnabled (const bool bUseSLI)
 
bool isELREnabled () const
 
void setELREnabled (const bool bUseELR)
 
bool isFlusherEnabled () const
 
void setFlusherEnabled (const bool bUseFlusher)
 
- Public Member Functions inherited from db_iface
 db_iface ()
 
virtual ~db_iface ()
 
eDBControl dbc ()
 
void set_dbc (const eDBControl adbc)
 

Public Attributes

statmap_t _statmap
 
ShoreTPCCTrxStats _last_stats
 
- Public Attributes inherited from ShoreEnv
RequestStack _request_pool
 

Additional Inherited Members

- Protected Member Functions inherited from ShoreEnv
void readconfig ()
 
int configure_sm ()
 
int start_sm ()
 
int close_sm ()
 
void to_base_flusher (Request *ar)
 
int _set_sys_params ()
 
- Protected Attributes inherited from ShoreEnv
ss_m_pssm
 
bool _clobber
 
bool _initialized
 
pthread_mutex_t _init_mutex
 
bool _loaded
 
pthread_mutex_t _load_mutex
 
pthread_mutex_t _statmap_mutex
 
pthread_mutex_t _last_stats_mutex
 
StoreID _root_iid
 
pthread_mutex_t _vol_mutex
 
sm_options _popts
 
WorkerPool _workers
 
uint _worker_cnt
 
double _scaling_factor
 
pthread_mutex_t _scaling_mutex
 
double _queried_factor
 
pthread_mutex_t _queried_mutex
 
int _loaders_to_use
 
env_stats_t _env_stats
 
sm_stats_t _last_sm_stats
 
volatile uint _measure
 
string _sysname
 
int _insert_freq
 
int _delete_freq
 
int _probe_freq
 
int _update_freq
 
int _chkpt_freq
 
bool _enable_archiver
 
bool _enable_merger
 
int _activation_delay
 
int _crash_delay
 
volatile bool _bAlarmSet
 
tatas_lock _alarm_lock
 
int _start_imbalance
 
skew_type_t _skew_type
 
std::atomic< bool > stop_benchmark
 
po::variables_map optionValues
 
bool _bUseSLI
 
bool _bUseELR
 
bool _bUseFlusher
 
bool _asynch_commit
 

Member Typedef Documentation

§ statmap_t

typedef std::map<pthread_t, ShoreTPCCTrxStats*> tpcc::ShoreTPCCEnv::statmap_t

Constructor & Destructor Documentation

§ ShoreTPCCEnv()

tpcc::ShoreTPCCEnv::ShoreTPCCEnv ( boost::program_options::variables_map  map)

§ ~ShoreTPCCEnv()

tpcc::ShoreTPCCEnv::~ShoreTPCCEnv ( )
virtual

Member Function Documentation

§ _get_stats()

ShoreTPCCTrxStats tpcc::ShoreTPCCEnv::_get_stats ( )

§ _xct_delivery_helper()

w_rc_t tpcc::ShoreTPCCEnv::_xct_delivery_helper ( const int  xct_id,
delivery_input_t pdin,
std::vector< int > &  dlist,
int &  d_id,
const bool  SPLIT_TRX 
)

§ check_consistency()

w_rc_t tpcc::ShoreTPCCEnv::check_consistency ( )
virtual

Implements ShoreEnv.

§ conf()

int tpcc::ShoreTPCCEnv::conf ( )
virtual

Reimplemented from ShoreEnv.

§ create_tables()

w_rc_t tpcc::ShoreTPCCEnv::create_tables ( )
virtual

Implements ShoreEnv.

§ db_fetch()

w_rc_t tpcc::ShoreTPCCEnv::db_fetch ( )
virtual

Reimplemented from ShoreEnv.

§ db_print()

w_rc_t tpcc::ShoreTPCCEnv::db_print ( int  lines)

§ DECLARE_TABLE() [1/9]

tpcc::ShoreTPCCEnv::DECLARE_TABLE ( warehouse_t  ,
warehouse_man_impl  ,
warehouse   
)

§ DECLARE_TABLE() [2/9]

tpcc::ShoreTPCCEnv::DECLARE_TABLE ( district_t  ,
district_man_impl  ,
district   
)

§ DECLARE_TABLE() [3/9]

tpcc::ShoreTPCCEnv::DECLARE_TABLE ( customer_t  ,
customer_man_impl  ,
customer   
)

§ DECLARE_TABLE() [4/9]

tpcc::ShoreTPCCEnv::DECLARE_TABLE ( history_t  ,
history_man_impl  ,
history   
)

§ DECLARE_TABLE() [5/9]

tpcc::ShoreTPCCEnv::DECLARE_TABLE ( new_order_t  ,
new_order_man_impl  ,
new_order   
)

§ DECLARE_TABLE() [6/9]

tpcc::ShoreTPCCEnv::DECLARE_TABLE ( order_t  ,
order_man_impl  ,
order   
)

§ DECLARE_TABLE() [7/9]

tpcc::ShoreTPCCEnv::DECLARE_TABLE ( order_line_t  ,
order_line_man_impl  ,
order_line   
)

§ DECLARE_TABLE() [8/9]

tpcc::ShoreTPCCEnv::DECLARE_TABLE ( item_t  ,
item_man_impl  ,
item   
)

§ DECLARE_TABLE() [9/9]

tpcc::ShoreTPCCEnv::DECLARE_TABLE ( stock_t  ,
stock_man_impl  ,
stock   
)

§ DECLARE_TRX() [1/9]

tpcc::ShoreTPCCEnv::DECLARE_TRX ( new_order  )

§ DECLARE_TRX() [2/9]

tpcc::ShoreTPCCEnv::DECLARE_TRX ( payment  )

§ DECLARE_TRX() [3/9]

tpcc::ShoreTPCCEnv::DECLARE_TRX ( order_status  )

§ DECLARE_TRX() [4/9]

tpcc::ShoreTPCCEnv::DECLARE_TRX ( delivery  )

§ DECLARE_TRX() [5/9]

tpcc::ShoreTPCCEnv::DECLARE_TRX ( stock_level  )

§ DECLARE_TRX() [6/9]

tpcc::ShoreTPCCEnv::DECLARE_TRX ( mbench_wh  )

§ DECLARE_TRX() [7/9]

tpcc::ShoreTPCCEnv::DECLARE_TRX ( mbench_cust  )

§ DECLARE_TRX() [8/9]

tpcc::ShoreTPCCEnv::DECLARE_TRX ( populate_baseline  )

§ DECLARE_TRX() [9/9]

tpcc::ShoreTPCCEnv::DECLARE_TRX ( populate_one_unit  )

§ dump()

int tpcc::ShoreTPCCEnv::dump ( )
virtual

Reimplemented from ShoreEnv.

§ env_thread_fini()

void tpcc::ShoreTPCCEnv::env_thread_fini ( )
virtual

Implements ShoreEnv.

§ env_thread_init()

void tpcc::ShoreTPCCEnv::env_thread_init ( )
virtual

Implements ShoreEnv.

§ info()

int tpcc::ShoreTPCCEnv::info ( ) const
virtual

Implements ShoreEnv.

§ load_and_register_fids()

w_rc_t tpcc::ShoreTPCCEnv::load_and_register_fids ( )
virtual

Implements ShoreEnv.

§ load_data()

w_rc_t tpcc::ShoreTPCCEnv::load_data ( )
virtual

Implements ShoreEnv.

§ load_schema()

w_rc_t tpcc::ShoreTPCCEnv::load_schema ( )
virtual

Implements ShoreEnv.

§ newrun()

virtual w_rc_t tpcc::ShoreTPCCEnv::newrun ( )
inlinevirtual

Implements ShoreEnv.

§ open()

virtual int tpcc::ShoreTPCCEnv::open ( )
inlinevirtual

Reimplemented from ShoreEnv.

§ pause()

virtual int tpcc::ShoreTPCCEnv::pause ( )
inlinevirtual

Reimplemented from ShoreEnv.

§ post_init()

int tpcc::ShoreTPCCEnv::post_init ( )
virtual

Reimplemented from ShoreEnv.

§ print_throughput()

void tpcc::ShoreTPCCEnv::print_throughput ( const double  iQueriedSF,
const int  iSpread,
const int  iNumOfThreads,
const double  delay 
)
virtual

Implements ShoreEnv.

§ reset_skew()

void tpcc::ShoreTPCCEnv::reset_skew ( )
virtual

Reimplemented from ShoreEnv.

§ reset_stats()

void tpcc::ShoreTPCCEnv::reset_stats ( )
virtual

Implements ShoreEnv.

§ resume()

virtual int tpcc::ShoreTPCCEnv::resume ( )
inlinevirtual

Reimplemented from ShoreEnv.

§ run_one_xct()

w_rc_t tpcc::ShoreTPCCEnv::run_one_xct ( Request prequest)
virtual

Implements ShoreEnv.

§ set()

virtual int tpcc::ShoreTPCCEnv::set ( envVarMap )
inlinevirtual

Reimplemented from ShoreEnv.

§ set_skew()

void tpcc::ShoreTPCCEnv::set_skew ( int  area,
int  load,
int  start_imbalance,
int  skew_type,
bool  shifting 
)
virtual

Reimplemented from ShoreEnv.

§ start()

int tpcc::ShoreTPCCEnv::start ( )
virtual

Reimplemented from ShoreEnv.

§ start_load_imbalance()

void tpcc::ShoreTPCCEnv::start_load_imbalance ( )
virtual

Reimplemented from ShoreEnv.

§ statistics()

int tpcc::ShoreTPCCEnv::statistics ( )
virtual

Reimplemented from ShoreEnv.

§ stop()

int tpcc::ShoreTPCCEnv::stop ( )
virtual

Reimplemented from ShoreEnv.

§ warmup()

w_rc_t tpcc::ShoreTPCCEnv::warmup ( )
virtual

Implements ShoreEnv.

Member Data Documentation

§ _last_stats

ShoreTPCCTrxStats tpcc::ShoreTPCCEnv::_last_stats

§ _statmap

statmap_t tpcc::ShoreTPCCEnv::_statmap

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