Zero  0.1.0
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
ShoreEnv Class Referenceabstract

#include <shore_env.h>

Inheritance diagram for ShoreEnv:
db_iface tpcb::ShoreTPCBEnv tpcc::ShoreTPCCEnv ycsb::ShoreYCSBEnv

Public Types

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

 ShoreEnv (po::variables_map &vm)
 
virtual ~ShoreEnv ()
 
sm_optionsget_opts ()
 
po::variables_map & get_optionValues ()
 
virtual int conf ()
 
virtual int set (envVarMap *)
 
virtual int init ()
 
virtual int post_init ()
 
virtual int open ()
 
virtual int close ()
 
virtual int start ()
 
virtual int stop ()
 
virtual int restart ()
 
virtual int pause ()
 
virtual int resume ()
 
virtual w_rc_t newrun ()=0
 
virtual int statistics ()
 
virtual int dump ()
 
virtual int info () const =0
 
virtual w_rc_t load_schema ()=0
 
virtual w_rc_t load_data ()=0
 
virtual w_rc_t create_tables ()=0
 
virtual w_rc_t warmup ()=0
 
virtual w_rc_t check_consistency ()=0
 
virtual w_rc_t load_and_register_fids ()=0
 
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)
 
virtual void set_skew (int area, int load, int start_imbalance, int skew_type, bool shifting=false)
 
virtual void reset_skew ()
 
virtual void start_load_imbalance ()
 
virtual w_rc_t db_fetch ()
 
uint upd_worker_cnt ()
 
trx_worker_tworker (const uint idx)
 
virtual void env_thread_init ()=0
 
virtual void env_thread_fini ()=0
 
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 ()
 
virtual void print_throughput (const double iQueriedSF, const int iSpread, const int iNumOfThreads, const double delay)=0
 
virtual void reset_stats ()=0
 
virtual w_rc_t run_one_xct (Request *prequest)=0
 
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

RequestStack _request_pool
 

Protected Member Functions

void readconfig ()
 
int configure_sm ()
 
int start_sm ()
 
int close_sm ()
 
void to_base_flusher (Request *ar)
 
int _set_sys_params ()
 

Protected Attributes

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

§ ParamMap

typedef std::map<string, string> ShoreEnv::ParamMap

§ Request

§ RequestStack

typedef blob_pool ShoreEnv::RequestStack

§ Worker

§ WorkerIt

typedef std::vector<WorkerPtr>::iterator ShoreEnv::WorkerIt

§ WorkerPool

typedef std::vector<WorkerPtr> ShoreEnv::WorkerPool

§ WorkerPtr

Constructor & Destructor Documentation

§ ShoreEnv()

ShoreEnv::ShoreEnv ( po::variables_map &  vm)

§ ~ShoreEnv()

ShoreEnv::~ShoreEnv ( )
virtual

Member Function Documentation

§ _set_sys_params()

int ShoreEnv::_set_sys_params ( )
protected

Helper functions

§ activate_archiver()

void ShoreEnv::activate_archiver ( )

§ check_consistency()

virtual w_rc_t ShoreEnv::check_consistency ( )
pure virtual

§ checkpoint()

int ShoreEnv::checkpoint ( )

§ close()

int ShoreEnv::close ( )
virtual

Implements db_iface.

§ close_sm()

int ShoreEnv::close_sm ( )
protected

Storage manager functions

§ conf()

int ShoreEnv::conf ( )
virtual

§ configure_sm()

int ShoreEnv::configure_sm ( )
protected

§ create_tables()

virtual w_rc_t ShoreEnv::create_tables ( )
pure virtual

§ db()

ss_m* ShoreEnv::db ( )
inline

§ db_fetch()

virtual w_rc_t ShoreEnv::db_fetch ( )
inlinevirtual

§ disable_fake_disk_latency()

int ShoreEnv::disable_fake_disk_latency ( )

§ dump()

int ShoreEnv::dump ( )
virtual

§ enable_fake_disk_latency()

int ShoreEnv::enable_fake_disk_latency ( const int  adelay)

§ env_thread_fini()

virtual void ShoreEnv::env_thread_fini ( )
pure virtual

§ env_thread_init()

virtual void ShoreEnv::env_thread_init ( )
pure virtual

§ gatherstats_sm()

void ShoreEnv::gatherstats_sm ( ostream &  stream)

§ get_activation_delay()

int ShoreEnv::get_activation_delay ( )
inline

§ get_chkpt_freq()

int ShoreEnv::get_chkpt_freq ( )
inline

§ get_crash_delay()

int ShoreEnv::get_crash_delay ( )
inline

§ get_dirty_page_count()

size_t ShoreEnv::get_dirty_page_count ( )

§ get_env_stats()

env_stats_t* ShoreEnv::get_env_stats ( )
inline

§ get_init_mutex()

pthread_mutex_t* ShoreEnv::get_init_mutex ( )
inline

§ get_init_no_cs()

bool ShoreEnv::get_init_no_cs ( )
inline

§ get_load_mutex()

pthread_mutex_t* ShoreEnv::get_load_mutex ( )
inline

§ get_loaded_no_cs()

bool ShoreEnv::get_loaded_no_cs ( )
inline

§ get_measure()

MeasurementState ShoreEnv::get_measure ( )
inline

§ get_num_restored_pages()

size_t ShoreEnv::get_num_restored_pages ( )

§ get_optionValues()

po::variables_map& ShoreEnv::get_optionValues ( )
inline

§ get_opts()

sm_options& ShoreEnv::get_opts ( )
inline

§ get_qf()

double ShoreEnv::get_qf ( ) const

§ get_sf()

double ShoreEnv::get_sf ( ) const

§ get_total_pages_to_recover()

size_t ShoreEnv::get_total_pages_to_recover ( )

§ get_total_pages_to_restore()

size_t ShoreEnv::get_total_pages_to_restore ( )

§ get_trx_att()

unsigned ShoreEnv::get_trx_att ( ) const

§ get_trx_com()

unsigned ShoreEnv::get_trx_com ( ) const

§ get_vol_mutex()

pthread_mutex_t* ShoreEnv::get_vol_mutex ( )
inline

§ has_log_analysis_finished()

bool ShoreEnv::has_log_analysis_finished ( )

§ inc_trx_att()

void ShoreEnv::inc_trx_att ( )
inline

§ inc_trx_com()

void ShoreEnv::inc_trx_com ( )
inline

§ info()

virtual int ShoreEnv::info ( ) const
pure virtual

§ init()

int ShoreEnv::init ( )
virtual

Implements db_iface.

§ is_archiver_enabled()

bool ShoreEnv::is_archiver_enabled ( )
inline

§ is_initialized()

bool ShoreEnv::is_initialized ( )

§ is_loaded()

bool ShoreEnv::is_loaded ( )

§ is_merger_enabled()

bool ShoreEnv::is_merger_enabled ( )
inline

§ isAsynchCommit()

bool ShoreEnv::isAsynchCommit ( ) const
inline

§ isELREnabled()

bool ShoreEnv::isELREnabled ( ) const
inline

§ isFlusherEnabled()

bool ShoreEnv::isFlusherEnabled ( ) const
inline

§ isSLIEnabled()

bool ShoreEnv::isSLIEnabled ( ) const
inline

§ load()

w_rc_t ShoreEnv::load ( )

§ load_and_register_fids()

virtual w_rc_t ShoreEnv::load_and_register_fids ( )
pure virtual

§ load_data()

virtual w_rc_t ShoreEnv::load_data ( )
pure virtual

§ load_schema()

virtual w_rc_t ShoreEnv::load_schema ( )
pure virtual

§ newrun()

virtual w_rc_t ShoreEnv::newrun ( )
pure virtual

§ open()

virtual int ShoreEnv::open ( )
inlinevirtual

§ pause()

virtual int ShoreEnv::pause ( )
inlinevirtual

§ post_init()

virtual int ShoreEnv::post_init ( )
inlinevirtual

§ print_sf()

void ShoreEnv::print_sf ( ) const

§ print_throughput()

virtual void ShoreEnv::print_throughput ( const double  iQueriedSF,
const int  iSpread,
const int  iNumOfThreads,
const double  delay 
)
pure virtual

§ readconfig()

void ShoreEnv::readconfig ( )
protected

§ reset_skew()

void ShoreEnv::reset_skew ( )
virtual

§ reset_stats()

virtual void ShoreEnv::reset_stats ( )
pure virtual

§ restart()

int ShoreEnv::restart ( )
virtual

Implements db_iface.

§ resume()

virtual int ShoreEnv::resume ( )
inlinevirtual

§ run_one_xct()

virtual w_rc_t ShoreEnv::run_one_xct ( Request prequest)
pure virtual

§ set()

virtual int ShoreEnv::set ( envVarMap )
inlinevirtual

§ set_activation_delay()

void ShoreEnv::set_activation_delay ( int  d)
inline

§ set_archiver_opts()

void ShoreEnv::set_archiver_opts ( bool  enable_archiver,
bool  enable_merger 
)

§ set_chkpt_freq()

void ShoreEnv::set_chkpt_freq ( int  chkpt_freq)

§ set_clobber()

void ShoreEnv::set_clobber ( bool  c)
inline

§ set_crash_delay()

void ShoreEnv::set_crash_delay ( int  crash_delay)

§ set_freqs()

void ShoreEnv::set_freqs ( int  insert_freq = 0,
int  delete_freq = 0,
int  probe_freq = 0,
int  update_freq = 0 
)

§ set_init_no_cs()

void ShoreEnv::set_init_no_cs ( const bool  b_is_init)
inline

§ set_loaded_no_cs()

void ShoreEnv::set_loaded_no_cs ( const bool  b_is_loaded)
inline

§ set_loaders()

void ShoreEnv::set_loaders ( int  l)
inline

§ set_measure()

void ShoreEnv::set_measure ( const MeasurementState  aMeasurementState)
inline

§ set_qf()

void ShoreEnv::set_qf ( const double  aQF)

§ set_sf()

void ShoreEnv::set_sf ( const double  aSF)

§ set_skew()

void ShoreEnv::set_skew ( int  area,
int  load,
int  start_imbalance,
int  skew_type,
bool  shifting = false 
)
virtual

§ set_sm_shudown_filthy()

void ShoreEnv::set_sm_shudown_filthy ( bool  filthy)

§ set_stop_benchmark()

void ShoreEnv::set_stop_benchmark ( bool  v)
inline

§ setAsynchCommit()

void ShoreEnv::setAsynchCommit ( const bool  bAsynch)

§ setELREnabled()

void ShoreEnv::setELREnabled ( const bool  bUseELR)
inline

§ setFlusherEnabled()

void ShoreEnv::setFlusherEnabled ( const bool  bUseFlusher)
inline

§ setSLIEnabled()

void ShoreEnv::setSLIEnabled ( const bool  bUseSLI)
inline

§ should_stop_benchmark()

bool ShoreEnv::should_stop_benchmark ( )
inline

§ start()

int ShoreEnv::start ( )
virtual

§ start_load_imbalance()

void ShoreEnv::start_load_imbalance ( )
virtual

§ start_sm()

int ShoreEnv::start_sm ( )
protected

§ statistics()

int ShoreEnv::statistics ( )
virtual

§ stop()

int ShoreEnv::stop ( )
virtual

§ sysname()

string ShoreEnv::sysname ( )
inline

§ to_base_flusher()

void ShoreEnv::to_base_flusher ( Request ar)
protected

§ upd_worker_cnt()

uint ShoreEnv::upd_worker_cnt ( )

§ update_partitioning()

virtual w_rc_t ShoreEnv::update_partitioning ( )
inlinevirtual

§ wait_for_warmup()

void ShoreEnv::wait_for_warmup ( )

§ warmup()

virtual w_rc_t ShoreEnv::warmup ( )
pure virtual

§ worker()

trx_worker_t * ShoreEnv::worker ( const uint  idx)

Member Data Documentation

§ _activation_delay

int ShoreEnv::_activation_delay
protected

§ _alarm_lock

tatas_lock ShoreEnv::_alarm_lock
protected

§ _asynch_commit

bool ShoreEnv::_asynch_commit
protected

§ _bAlarmSet

volatile bool ShoreEnv::_bAlarmSet
protected

§ _bUseELR

bool ShoreEnv::_bUseELR
protected

§ _bUseFlusher

bool ShoreEnv::_bUseFlusher
protected

§ _bUseSLI

bool ShoreEnv::_bUseSLI
protected

§ _chkpt_freq

int ShoreEnv::_chkpt_freq
protected

§ _clobber

bool ShoreEnv::_clobber
protected

§ _crash_delay

int ShoreEnv::_crash_delay
protected

§ _delete_freq

int ShoreEnv::_delete_freq
protected

§ _enable_archiver

bool ShoreEnv::_enable_archiver
protected

§ _enable_merger

bool ShoreEnv::_enable_merger
protected

§ _env_stats

env_stats_t ShoreEnv::_env_stats
protected

§ _init_mutex

pthread_mutex_t ShoreEnv::_init_mutex
protected

§ _initialized

bool ShoreEnv::_initialized
protected

§ _insert_freq

int ShoreEnv::_insert_freq
protected

§ _last_sm_stats

sm_stats_t ShoreEnv::_last_sm_stats
protected

§ _last_stats_mutex

pthread_mutex_t ShoreEnv::_last_stats_mutex
protected

§ _load_mutex

pthread_mutex_t ShoreEnv::_load_mutex
protected

§ _loaded

bool ShoreEnv::_loaded
protected

§ _loaders_to_use

int ShoreEnv::_loaders_to_use
protected

§ _measure

volatile uint ShoreEnv::_measure
protected

§ _popts

sm_options ShoreEnv::_popts
protected

§ _probe_freq

int ShoreEnv::_probe_freq
protected

§ _pssm

ss_m* ShoreEnv::_pssm
protected

§ _queried_factor

double ShoreEnv::_queried_factor
protected

§ _queried_mutex

pthread_mutex_t ShoreEnv::_queried_mutex
protected

§ _request_pool

RequestStack ShoreEnv::_request_pool

§ _root_iid

StoreID ShoreEnv::_root_iid
protected

§ _scaling_factor

double ShoreEnv::_scaling_factor
protected

§ _scaling_mutex

pthread_mutex_t ShoreEnv::_scaling_mutex
protected

§ _skew_type

skew_type_t ShoreEnv::_skew_type
protected

§ _start_imbalance

int ShoreEnv::_start_imbalance
protected

§ _statmap_mutex

pthread_mutex_t ShoreEnv::_statmap_mutex
protected

§ _sysname

string ShoreEnv::_sysname
protected

§ _update_freq

int ShoreEnv::_update_freq
protected

§ _vol_mutex

pthread_mutex_t ShoreEnv::_vol_mutex
protected

§ _worker_cnt

uint ShoreEnv::_worker_cnt
protected

§ _workers

WorkerPool ShoreEnv::_workers
protected

§ optionValues

po::variables_map ShoreEnv::optionValues
protected

§ stop_benchmark

std::atomic<bool> ShoreEnv::stop_benchmark
protected

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