Zero  0.1.0
Classes | Typedefs | Functions | Variables
tpcc Namespace Reference

Classes

class  baseline_tpcc_client_t
 
class  customer_man_impl
 
struct  delivery_input_t
 
class  district_man_impl
 
class  history_man_impl
 
class  item_man_impl
 
struct  mbench_cust_input_t
 
struct  mbench_wh_input_t
 
struct  new_order_input_t
 
class  new_order_man_impl
 
struct  no_item_nord_input_t
 
struct  ol_item_info
 
class  order_line_man_impl
 
class  order_man_impl
 
struct  order_status_input_t
 
struct  payment_input_t
 
struct  populate_baseline_input_t
 
struct  populate_one_unit_input_t
 
class  ShoreTPCCEnv
 
struct  ShoreTPCCTrxCount
 
struct  ShoreTPCCTrxStats
 
struct  stock_level_input_t
 
class  stock_man_impl
 
struct  tpcc_customer_tuple
 
struct  tpcc_customer_tuple_body
 
struct  tpcc_customer_tuple_key
 
struct  tpcc_district_tuple
 
struct  tpcc_district_tuple_key
 
struct  tpcc_history_tuple
 
struct  tpcc_history_tuple_body
 
struct  tpcc_history_tuple_key
 
struct  tpcc_item_tuple
 
struct  tpcc_item_tuple_key
 
struct  tpcc_new_order_tuple
 
struct  tpcc_order_tuple
 
struct  tpcc_order_tuple_body
 
struct  tpcc_order_tuple_key
 
struct  tpcc_orderline_tuple
 
struct  tpcc_orderline_tuple_body
 
struct  tpcc_orderline_tuple_key
 
struct  tpcc_stock_tuple
 
struct  tpcc_stock_tuple_key
 
struct  tpcc_warehouse_tuple
 
struct  tpcc_warehouse_tuple_key
 
class  warehouse_man_impl
 
struct  with_item_nord_input_t
 

Typedefs

typedef vector< pair< int, int > > TwoIntVec
 
typedef TwoIntVec::iterator TwoIntVecIt
 

Functions

int random_xct_type (int selected)
 
static void gen_cid_array (int *cid_array)
 
int get_wh (int sf, int specificWH, int tspread)
 
new_order_input_t create_new_order_input (int sf, int specificWH, int tspread)
 
payment_input_t create_payment_input (int sf, int specificWH, int tspread)
 
order_status_input_t create_order_status_input (int sf, int specificWH, int tspread)
 
delivery_input_t create_delivery_input (int sf, int specificWH, int tspread)
 
stock_level_input_t create_stock_level_input (int sf, int specificWH, int tspread)
 
mbench_wh_input_t create_mbench_wh_input (int sf, int specificWH, int tspread)
 
mbench_cust_input_t create_mbench_cust_input (int sf, int specificWH, int tspread)
 
int random (int low, int high, randgen_t *rp)
 Generates a uniform random number between low and high. Not seen by public. More...
 
int URand (int low, int high)
 Generates a uniform random number between (low) and (high) More...
 
int NURand (int A, int low, int high)
 Generates a non-uniform random number. More...
 
int generate_cust_last (int select, char *dest)
 
 DECLARE_TABLE_SCHEMA (warehouse_t)
 
 DECLARE_TABLE_SCHEMA (district_t)
 
 DECLARE_TABLE_SCHEMA (stock_t)
 
 DECLARE_TABLE_SCHEMA (order_line_t)
 
 DECLARE_TABLE_SCHEMA (customer_t)
 
 DECLARE_TABLE_SCHEMA (history_t)
 
 DECLARE_TABLE_SCHEMA (order_t)
 
 DECLARE_TABLE_SCHEMA (new_order_t)
 
 DECLARE_TABLE_SCHEMA (item_t)
 
static int rand_integer (int lo, int hi)
 
static int create_random_a_string (char *out_buffer, int length_lo, int length_hi)
 
static int create_random_n_string (char *out_buffer, int length_lo, int length_hi)
 
int NUrand_val (int A, int x, int y, int C)
 
int create_a_string_with_original (char *out_buffer, int length_lo, int length_hi, int percent_to_set)
 
int create_random_last_name (char *out_buffer, int cust_num)
 
void test_serialization (table_row_t *prol)
 
 DEFINE_TRX (ShoreTPCCEnv, new_order)
 
 DEFINE_TRX (ShoreTPCCEnv, payment)
 
 DEFINE_TRX (ShoreTPCCEnv, order_status)
 
 DEFINE_TRX (ShoreTPCCEnv, delivery)
 
 DEFINE_TRX (ShoreTPCCEnv, stock_level)
 
 DEFINE_TRX (ShoreTPCCEnv, mbench_wh)
 
 DEFINE_TRX (ShoreTPCCEnv, mbench_cust)
 

Variables

const int TPCC_C_LAST_SZ = 16
 
const int TPCC_C_FIRST_SZ = 16
 
const int DISTRICTS_PER_WAREHOUSE = 10
 
const int CUSTOMERS_PER_DISTRICT = 3000
 
const int ITEMS = 100000
 
const int STOCK_PER_WAREHOUSE = ITEMS
 
const int MIN_OL_PER_ORDER = 5
 
const int MAX_OL_PER_ORDER = 15
 
const int NU_ORDERS_PER_DISTRICT = 900
 
const int MAX_TABLENAM_LENGTH = 20
 
const int MAX_RECORD_LENGTH = 512
 
const int TPCC_WAREHOUSE_FCOUNT = 9
 
const int TPCC_DISTRICT_FCOUNT = 11
 
const int TPCC_CUSTOMER_FCOUNT = 22
 
const int TPCC_HISTORY_FCOUNT = 8
 
const int TPCC_NEW_ORDER_FCOUNT = 3
 
const int TPCC_ORDER_FCOUNT = 8
 
const int TPCC_ORDER_LINE_FCOUNT = 10
 
const int TPCC_ITEM_FCOUNT = 5
 
const int TPCC_STOCK_FCOUNT = 17
 
const int SHORE_TPCC_TABLES = 9
 
const int XCT_MIX = 0
 
const int XCT_NEW_ORDER = 1
 
const int XCT_PAYMENT = 2
 
const int XCT_ORDER_STATUS = 3
 
const int XCT_DELIVERY = 4
 
const int XCT_STOCK_LEVEL = 5
 
const int XCT_LITTLE_MIX = 9
 
const int XCT_MBENCH_WH = 11
 
const int XCT_MBENCH_CUST = 12
 
const int PROB_NEWORDER = 45
 
const int PROB_PAYMENT = 43
 
const int PROB_ORDER_STATUS = 4
 
const int PROB_DELIVERY = 4
 
const int PROB_STOCK_LEVEL = 4
 
static unsigned long units_completed = 0
 
static int const NORD_PER_UNIT = 9
 
static int const CUST_PER_UNIT = 30
 
static int const HIST_PER_UNIT = 30
 
static int const ORDERS_PER_UNIT = 30
 
static int const STOCK_PER_UNIT = 100
 
static int const UNIT_PER_WH = 1000
 
static int const UNIT_PER_DIST = 100
 
static int const ORDERS_PER_DIST = 3000
 
skewer_t w_skewer
 
bool _change_load = false
 
const char * CUST_LAST [10]
 
static __thread ShoreTPCCTrxStats my_stats
 
static char alnum []
 
static const char * last_name_parts []
 
unsigned int delivery_abort_ctr = 0
 

Typedef Documentation

§ TwoIntVec

typedef vector<pair<int, int> > tpcc::TwoIntVec

§ TwoIntVecIt

typedef TwoIntVec::iterator tpcc::TwoIntVecIt

Function Documentation

§ create_a_string_with_original()

int tpcc::create_a_string_with_original ( char *  out_buffer,
int  length_lo,
int  length_hi,
int  percent_to_set 
)

§ create_delivery_input()

delivery_input_t tpcc::create_delivery_input ( int  sf,
int  specificWH,
int  tspread 
)

§ create_mbench_cust_input()

mbench_cust_input_t tpcc::create_mbench_cust_input ( int  sf,
int  specificWH,
int  tspread 
)

§ create_mbench_wh_input()

mbench_wh_input_t tpcc::create_mbench_wh_input ( int  sf,
int  specificWH,
int  tspread 
)

§ create_new_order_input()

new_order_input_t tpcc::create_new_order_input ( int  sf,
int  specificWH,
int  tspread 
)

§ create_order_status_input()

order_status_input_t tpcc::create_order_status_input ( int  sf,
int  specificWH,
int  tspread 
)

§ create_payment_input()

payment_input_t tpcc::create_payment_input ( int  sf,
int  specificWH = 0,
int  tspread = 0 
)

Exported functionality

§ create_random_a_string()

static int tpcc::create_random_a_string ( char *  out_buffer,
int  length_lo,
int  length_hi 
)
static

§ create_random_last_name()

int tpcc::create_random_last_name ( char *  out_buffer,
int  cust_num 
)

§ create_random_n_string()

static int tpcc::create_random_n_string ( char *  out_buffer,
int  length_lo,
int  length_hi 
)
static

§ create_stock_level_input()

stock_level_input_t tpcc::create_stock_level_input ( int  sf,
int  specificWH,
int  tspread 
)

§ DECLARE_TABLE_SCHEMA() [1/9]

tpcc::DECLARE_TABLE_SCHEMA ( warehouse_t  )

§ DECLARE_TABLE_SCHEMA() [2/9]

tpcc::DECLARE_TABLE_SCHEMA ( district_t  )

§ DECLARE_TABLE_SCHEMA() [3/9]

tpcc::DECLARE_TABLE_SCHEMA ( stock_t  )

§ DECLARE_TABLE_SCHEMA() [4/9]

tpcc::DECLARE_TABLE_SCHEMA ( order_line_t  )

§ DECLARE_TABLE_SCHEMA() [5/9]

tpcc::DECLARE_TABLE_SCHEMA ( customer_t  )

§ DECLARE_TABLE_SCHEMA() [6/9]

tpcc::DECLARE_TABLE_SCHEMA ( history_t  )

§ DECLARE_TABLE_SCHEMA() [7/9]

tpcc::DECLARE_TABLE_SCHEMA ( order_t  )

§ DECLARE_TABLE_SCHEMA() [8/9]

tpcc::DECLARE_TABLE_SCHEMA ( new_order_t  )

§ DECLARE_TABLE_SCHEMA() [9/9]

tpcc::DECLARE_TABLE_SCHEMA ( item_t  )

§ DEFINE_TRX() [1/7]

tpcc::DEFINE_TRX ( ShoreTPCCEnv  ,
new_order   
)

§ DEFINE_TRX() [2/7]

tpcc::DEFINE_TRX ( ShoreTPCCEnv  ,
payment   
)

§ DEFINE_TRX() [3/7]

tpcc::DEFINE_TRX ( ShoreTPCCEnv  ,
order_status   
)

§ DEFINE_TRX() [4/7]

tpcc::DEFINE_TRX ( ShoreTPCCEnv  ,
delivery   
)

§ DEFINE_TRX() [5/7]

tpcc::DEFINE_TRX ( ShoreTPCCEnv  ,
stock_level   
)

§ DEFINE_TRX() [6/7]

tpcc::DEFINE_TRX ( ShoreTPCCEnv  ,
mbench_wh   
)

§ DEFINE_TRX() [7/7]

tpcc::DEFINE_TRX ( ShoreTPCCEnv  ,
mbench_cust   
)

§ gen_cid_array()

static void tpcc::gen_cid_array ( int *  cid_array)
static

§ generate_cust_last()

int tpcc::generate_cust_last ( int  select,
char *  dest 
)

§ get_wh()

int tpcc::get_wh ( int  sf,
int  specificWH,
int  tspread 
)

§ NURand()

int tpcc::NURand ( int  A,
int  low,
int  high 
)

Generates a non-uniform random number.

Terminology

[x .. y]: Represents a closed range of values starting with x and ending with y NURand(A, x, y): Non-uniform distributed value between x and y URand(x, y): Uniformly distributed value between x and yExported Functions

§ NUrand_val()

int tpcc::NUrand_val ( int  A,
int  x,
int  y,
int  C 
)

§ rand_integer()

static int tpcc::rand_integer ( int  lo,
int  hi 
)
static

§ random()

tpcc::random ( int  low,
int  high,
randgen_t rp 
)

Generates a uniform random number between low and high. Not seen by public.

Terminology

[x .. y]: Represents a closed range of values starting with x and ending with y

random(x,y): uniformly distributed value between x and y.

NURand(A, x, y): (((random(0, A) | random(x, y)) + C) % (y - x + 1)) + x non-uniform random, where exp-1 | exp-2: bitwise logical OR exp-1 % exp-2: exp-1 modulo exp-2 C: random(0, A)

§ random_xct_type()

int tpcc::random_xct_type ( int  selected)

§ test_serialization()

void tpcc::test_serialization ( table_row_t prol)

§ URand()

tpcc::URand ( int  low,
int  high 
)

Generates a uniform random number between (low) and (high)

Variable Documentation

§ _change_load

bool tpcc::_change_load = false

§ alnum

char tpcc::alnum[]
static
Initial value:
=
"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"

§ CUST_LAST

const char* tpcc::CUST_LAST[10]
Initial value:
= {"BAR", "OUGHT", "ABLE", "PRI", "PRES", "ESE",
"ANTI", "CALLY", "ATION", "EING"}

§ CUST_PER_UNIT

int const tpcc::CUST_PER_UNIT = 30
static

§ CUSTOMERS_PER_DISTRICT

const int tpcc::CUSTOMERS_PER_DISTRICT = 3000

§ delivery_abort_ctr

unsigned int tpcc::delivery_abort_ctr = 0

§ DISTRICTS_PER_WAREHOUSE

const int tpcc::DISTRICTS_PER_WAREHOUSE = 10

§ HIST_PER_UNIT

int const tpcc::HIST_PER_UNIT = 30
static

§ ITEMS

const int tpcc::ITEMS = 100000

§ last_name_parts

const char* tpcc::last_name_parts[]
static
Initial value:
=
{
"BAR",
"OUGHT",
"ABLE",
"PRI",
"PRES",
"ESE",
"ANTI",
"CALLY",
"ATION",
"EING"
}

§ MAX_OL_PER_ORDER

const int tpcc::MAX_OL_PER_ORDER = 15

§ MAX_RECORD_LENGTH

const int tpcc::MAX_RECORD_LENGTH = 512

§ MAX_TABLENAM_LENGTH

const int tpcc::MAX_TABLENAM_LENGTH = 20

§ MIN_OL_PER_ORDER

const int tpcc::MIN_OL_PER_ORDER = 5

§ my_stats

__thread ShoreTPCCTrxStats tpcc::my_stats
static

§ NORD_PER_UNIT

int const tpcc::NORD_PER_UNIT = 9
static

§ NU_ORDERS_PER_DISTRICT

const int tpcc::NU_ORDERS_PER_DISTRICT = 900

§ ORDERS_PER_DIST

int const tpcc::ORDERS_PER_DIST = 3000
static

§ ORDERS_PER_UNIT

int const tpcc::ORDERS_PER_UNIT = 30
static

§ PROB_DELIVERY

const int tpcc::PROB_DELIVERY = 4

§ PROB_NEWORDER

const int tpcc::PROB_NEWORDER = 45

§ PROB_ORDER_STATUS

const int tpcc::PROB_ORDER_STATUS = 4

§ PROB_PAYMENT

const int tpcc::PROB_PAYMENT = 43

§ PROB_STOCK_LEVEL

const int tpcc::PROB_STOCK_LEVEL = 4

§ SHORE_TPCC_TABLES

const int tpcc::SHORE_TPCC_TABLES = 9

§ STOCK_PER_UNIT

int const tpcc::STOCK_PER_UNIT = 100
static

§ STOCK_PER_WAREHOUSE

const int tpcc::STOCK_PER_WAREHOUSE = ITEMS

§ TPCC_C_FIRST_SZ

const int tpcc::TPCC_C_FIRST_SZ = 16

§ TPCC_C_LAST_SZ

const int tpcc::TPCC_C_LAST_SZ = 16

§ TPCC_CUSTOMER_FCOUNT

const int tpcc::TPCC_CUSTOMER_FCOUNT = 22

§ TPCC_DISTRICT_FCOUNT

const int tpcc::TPCC_DISTRICT_FCOUNT = 11

§ TPCC_HISTORY_FCOUNT

const int tpcc::TPCC_HISTORY_FCOUNT = 8

§ TPCC_ITEM_FCOUNT

const int tpcc::TPCC_ITEM_FCOUNT = 5

§ TPCC_NEW_ORDER_FCOUNT

const int tpcc::TPCC_NEW_ORDER_FCOUNT = 3

§ TPCC_ORDER_FCOUNT

const int tpcc::TPCC_ORDER_FCOUNT = 8

§ TPCC_ORDER_LINE_FCOUNT

const int tpcc::TPCC_ORDER_LINE_FCOUNT = 10

§ TPCC_STOCK_FCOUNT

const int tpcc::TPCC_STOCK_FCOUNT = 17

§ TPCC_WAREHOUSE_FCOUNT

const int tpcc::TPCC_WAREHOUSE_FCOUNT = 9

§ UNIT_PER_DIST

int const tpcc::UNIT_PER_DIST = 100
static

§ UNIT_PER_WH

int const tpcc::UNIT_PER_WH = 1000
static

§ units_completed

unsigned long tpcc::units_completed = 0
static

§ w_skewer

skewer_t tpcc::w_skewer

Exported variables

§ XCT_DELIVERY

const int tpcc::XCT_DELIVERY = 4

§ XCT_LITTLE_MIX

const int tpcc::XCT_LITTLE_MIX = 9

§ XCT_MBENCH_CUST

const int tpcc::XCT_MBENCH_CUST = 12

§ XCT_MBENCH_WH

const int tpcc::XCT_MBENCH_WH = 11

§ XCT_MIX

const int tpcc::XCT_MIX = 0

§ XCT_NEW_ORDER

const int tpcc::XCT_NEW_ORDER = 1

§ XCT_ORDER_STATUS

const int tpcc::XCT_ORDER_STATUS = 3

§ XCT_PAYMENT

const int tpcc::XCT_PAYMENT = 2

§ XCT_STOCK_LEVEL

const int tpcc::XCT_STOCK_LEVEL = 5