Zero  0.1.0
tpcc_const.h
Go to the documentation of this file.
1 /* -*- mode:C++; c-basic-offset:4 -*-
2  Shore-kits -- Benchmark implementations for Shore-MT
3 
4  Copyright (c) 2007-2009
5  Data Intensive Applications and Systems Labaratory (DIAS)
6  Ecole Polytechnique Federale de Lausanne
7 
8  All Rights Reserved.
9 
10  Permission to use, copy, modify and distribute this software and
11  its documentation is hereby granted, provided that both the
12  copyright notice and this permission notice appear in all copies of
13  the software, derivative works or modified versions, and any
14  portions thereof, and that both notices appear in supporting
15  documentation.
16 
17  This code is distributed in the hope that it will be useful, but
18  WITHOUT ANY WARRANTY; without even the implied warranty of
19  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS
20  DISCLAIM ANY LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER
21  RESULTING FROM THE USE OF THIS SOFTWARE.
22 */
23 
32 #ifndef __TPCC_CONST_H
33 #define __TPCC_CONST_H
34 
35 namespace tpcc {
36 
37  const int TPCC_C_LAST_SZ = 16;
38 
39  const int TPCC_C_FIRST_SZ = 16;
40 
41 
42 
43 // --- standard scale -- //
44 
45  const int DISTRICTS_PER_WAREHOUSE = 10;
46 
47  const int CUSTOMERS_PER_DISTRICT = 3000;
48 
49  const int ITEMS = 100000;
50 
52 
53  const int MIN_OL_PER_ORDER = 5;
54 
55  const int MAX_OL_PER_ORDER = 15;
56 
57  const int NU_ORDERS_PER_DISTRICT = 900;
58 
59  const int MAX_TABLENAM_LENGTH = 20;
60 
61  const int MAX_RECORD_LENGTH = 512;
62 
63 
64 // --- number of fields per table --- //
65 
66  const int TPCC_WAREHOUSE_FCOUNT = 9;
67 
68  const int TPCC_DISTRICT_FCOUNT = 11;
69 
70  const int TPCC_CUSTOMER_FCOUNT = 22;
71 
72  const int TPCC_HISTORY_FCOUNT = 8;
73 
74  const int TPCC_NEW_ORDER_FCOUNT = 3;
75 
76  const int TPCC_ORDER_FCOUNT = 8;
77 
78  const int TPCC_ORDER_LINE_FCOUNT = 10;
79 
80  const int TPCC_ITEM_FCOUNT = 5;
81 
82  const int TPCC_STOCK_FCOUNT = 17;
83 
84 // -- number of tables -- //
85 
86  const int SHORE_TPCC_TABLES = 9;
87 
88 
89 
90 /* ----------------------------- */
91 /* --- TPC-C TRANSACTION MIX --- */
92 /* ----------------------------- */
93 
94  const int XCT_MIX = 0;
95 
96  const int XCT_NEW_ORDER = 1;
97 
98  const int XCT_PAYMENT = 2;
99 
100  const int XCT_ORDER_STATUS = 3;
101 
102  const int XCT_DELIVERY = 4;
103 
104  const int XCT_STOCK_LEVEL = 5;
105 
106  const int XCT_LITTLE_MIX = 9;
107 
108  const int XCT_MBENCH_WH = 11;
109 
110  const int XCT_MBENCH_CUST = 12;
111 
112 
113 // --- probabilities for the TPC-C MIX --- //
114 
115  const int PROB_NEWORDER = 45;
116 
117  const int PROB_PAYMENT = 43;
118 
119  const int PROB_ORDER_STATUS = 4;
120 
121  const int PROB_DELIVERY = 4;
122 
123  const int PROB_STOCK_LEVEL = 4;
124 
125 
126 // --- Helper functions --- //
127 
128 
129 // Translates or picks a random xct type given the benchmark specification
130  int random_xct_type(int selected);
131 };
132 
133 #endif // __TPCC_CONST_H
const int ITEMS
Definition: tpcc_const.h:49
const int PROB_ORDER_STATUS
Definition: tpcc_const.h:119
const int TPCC_NEW_ORDER_FCOUNT
Definition: tpcc_const.h:74
const int CUSTOMERS_PER_DISTRICT
Definition: tpcc_const.h:47
const int PROB_PAYMENT
Definition: tpcc_const.h:117
const int XCT_MBENCH_WH
Definition: tpcc_const.h:108
const int XCT_NEW_ORDER
Definition: tpcc_const.h:96
const int XCT_LITTLE_MIX
Definition: tpcc_const.h:106
const int XCT_MBENCH_CUST
Definition: tpcc_const.h:110
const int STOCK_PER_WAREHOUSE
Definition: tpcc_const.h:51
Definition: tpcc_client.cpp:33
const int PROB_STOCK_LEVEL
Definition: tpcc_const.h:123
const int TPCC_ORDER_LINE_FCOUNT
Definition: tpcc_const.h:78
const int TPCC_DISTRICT_FCOUNT
Definition: tpcc_const.h:68
const int XCT_STOCK_LEVEL
Definition: tpcc_const.h:104
const int SHORE_TPCC_TABLES
Definition: tpcc_const.h:86
const int TPCC_CUSTOMER_FCOUNT
Definition: tpcc_const.h:70
const int MAX_TABLENAM_LENGTH
Definition: tpcc_const.h:59
const int XCT_ORDER_STATUS
Definition: tpcc_const.h:100
const int TPCC_C_LAST_SZ
Definition: tpcc_const.h:37
const int TPCC_C_FIRST_SZ
Definition: tpcc_const.h:39
const int PROB_DELIVERY
Definition: tpcc_const.h:121
const int TPCC_STOCK_FCOUNT
Definition: tpcc_const.h:82
const int XCT_DELIVERY
Definition: tpcc_const.h:102
const int MAX_OL_PER_ORDER
Definition: tpcc_const.h:55
int random_xct_type(int selected)
Definition: tpcc_random.cpp:169
const int TPCC_ORDER_FCOUNT
Definition: tpcc_const.h:76
const int XCT_PAYMENT
Definition: tpcc_const.h:98
const int NU_ORDERS_PER_DISTRICT
Definition: tpcc_const.h:57
const int TPCC_ITEM_FCOUNT
Definition: tpcc_const.h:80
const int PROB_NEWORDER
Definition: tpcc_const.h:115
const int MIN_OL_PER_ORDER
Definition: tpcc_const.h:53
const int TPCC_HISTORY_FCOUNT
Definition: tpcc_const.h:72
const int MAX_RECORD_LENGTH
Definition: tpcc_const.h:61
const int TPCC_WAREHOUSE_FCOUNT
Definition: tpcc_const.h:66
const int DISTRICTS_PER_WAREHOUSE
Definition: tpcc_const.h:45
const int XCT_MIX
Definition: tpcc_const.h:94