Zero  0.1.0
tpcb_input.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 __TPCB_INPUT_H
33 #define __TPCB_INPUT_H
34 
35 #include "skewer.h"
36 #include "util/random_input.h"
37 
38 // CS: default mix should always be 0
39 const int XCT_TPCB_ACCT_UPDATE = 0;
40 
41 const int XCT_TPCB_POPULATE_DB = 39;
42 
43 // microbenchmarks
45 
47 
49 
51 
53 
55 
56 const int XCT_TPCB_MBENCH_MIX = 47;
57 
58 enum {
60 };
61 enum {
63 };
64 enum {
66 }; // must evenly divide ACCOUNTS_PER_BRANCH
67 
68 
70 // related to dynamic skew
71 extern skewer_t b_skewer;
72 
73 extern skewer_t t_skewer;
74 
75 extern skewer_t a_skewer;
76 
77 extern bool _change_load;
78 
79 
83 /*********************************************************************
84  *
85  * @class abstract trx_input_t
86  *
87  * @brief Base class for the Input of any transaction
88  *
89  *********************************************************************/
90 
92  int b_id;
93 
94  int t_id;
95 
96  int a_id;
97 
98  double delta;
99 
101 };
102 
104  int _sf;
105 
107 
108  populate_db_input_t(int sf, int a_id) : _sf(sf),
109  _first_a_id(a_id) {}
110 };
111 
112 // microbenchmarks
114  int b_id;
115 
116  int a_id;
117 
118  double balance;
119 
121 
122  void print();
123 };
124 
126  int b_id;
127 
128  int a_id;
129 
130  double balance;
131 
133 
134  void print();
135 };
136 
138  int b_id;
139 
140  int a_id;
141 
142  double balance;
143 
145 
146  void print();
147 };
148 
150  int b_id;
151 
152  int a_id;
153 
154  double balance;
155 
157 };
158 
160  int b_id;
161 
162  int a_id;
163 
164  double balance;
165 
167 };
168 
170  int b_id;
171 
172  int a_id;
173 
174  double balance;
175 
177 };
178 
180  int b_id;
181 
182  int a_id;
183 
184  double balance;
185 
187 };
188 
189 
191 //
192 // @brief: Declaration of functions that generate the inputs
193 // for the TPCB TRXs
194 //
196 
197 
199  int specificBr = 0, int tspread = 0);
200 
202  int specificBr = 0, int tspread = 0);
203 
205  int specificBr = 0, int tspread = 0);
206 
208  int specificBr = 0, int tspread = 0);
209 
211  int specificBr = 0, int tspread = 0);
212 
214  int specificBr = 0, int tspread = 0);
215 
217  int specificBr = 0, int tspread = 0);
218 
220  int specificBr = 0, int tspread = 0);
221 
223  int specificBr = 0, int tspread = 0);
224 
225 #endif // __TPCB_INPUT_H
mbench_delete_probe_input_t()
Definition: tpcb_input.h:176
skewer_t t_skewer
Definition: tpcb_input.cpp:54
int b_id
Definition: tpcb_input.h:170
const int XCT_TPCB_MBENCH_MIX
Definition: tpcb_input.h:56
mbench_mix_input_t create_mbench_mix_input(int SF, int specificBr=0, int tspread=0)
Definition: tpcb_input.cpp:304
int a_id
Definition: tpcb_input.h:116
mbench_insert_delete_input_t create_mbench_insert_delete_input(int SF, int specificBr=0, int tspread=0)
Definition: tpcb_input.cpp:238
mbench_insert_only_input_t create_mbench_insert_only_input(int SF, int specificBr=0, int tspread=0)
Definition: tpcb_input.cpp:135
mbench_insert_delete_input_t()
Definition: tpcb_input.h:156
const int XCT_TPCB_MBENCH_INSERT_PROBE
Definition: tpcb_input.h:52
int a_id
Definition: tpcb_input.h:172
Definition: tpcb_input.h:159
Definition: tpcb_input.h:149
int b_id
Definition: tpcb_input.h:126
int b_id
Definition: tpcb_input.h:180
Definition: tpcb_input.h:137
Definition: tpcb_input.h:62
const int XCT_TPCB_MBENCH_INSERT_ONLY
Definition: tpcb_input.h:44
double balance
Definition: tpcb_input.h:184
Definition: tpcb_input.h:179
int _first_a_id
Definition: tpcb_input.h:106
Definition: skewer.h:67
const int XCT_TPCB_POPULATE_DB
Definition: tpcb_input.h:41
int b_id
Definition: tpcb_input.h:114
bool _change_load
Definition: tpcb_input.cpp:58
int a_id
Definition: tpcb_input.h:182
int _sf
Definition: tpcb_input.h:104
int b_id
Definition: tpcb_input.h:138
Definition: tpcb_input.h:59
int b_id
Definition: tpcb_input.h:160
double balance
Definition: tpcb_input.h:142
acct_update_input_t create_acct_update_input(int SF, int specificBr=0, int tspread=0)
Definition: tpcb_input.cpp:65
int a_id
Definition: tpcb_input.h:162
populate_db_input_t create_populate_db_input(int SF, int specificBr=0, int tspread=0)
Definition: tpcb_input.cpp:119
mbench_delete_probe_input_t create_mbench_delete_probe_input(int SF, int specificBr=0, int tspread=0)
Definition: tpcb_input.cpp:282
Definition: tpcb_input.h:169
double balance
Definition: tpcb_input.h:174
int b_id
Definition: tpcb_input.h:150
int a_id
Definition: tpcb_input.h:152
double delta
Definition: tpcb_input.h:98
const int XCT_TPCB_MBENCH_DELETE_PROBE
Definition: tpcb_input.h:54
const int XCT_TPCB_ACCT_UPDATE
Definition: tpcb_input.h:39
mbench_probe_only_input_t()
Definition: tpcb_input.h:144
double balance
Definition: tpcb_input.h:154
Definition: tpcb_input.h:125
skewer_t b_skewer
Definition: tpcb_input.cpp:52
int a_id
Definition: tpcb_input.h:96
int a_id
Definition: tpcb_input.h:128
mbench_delete_only_input_t()
Definition: tpcb_input.h:132
acct_update_input_t()
Definition: tpcb_input.h:100
mbench_delete_only_input_t create_mbench_delete_only_input(int SF, int specificBr=0, int tspread=0)
Definition: tpcb_input.cpp:170
double balance
Definition: tpcb_input.h:118
const int XCT_TPCB_MBENCH_PROBE_ONLY
Definition: tpcb_input.h:48
int t_id
Definition: tpcb_input.h:94
Definition: tpcb_input.h:103
Definition for the class skewer.
skewer_t a_skewer
Definition: tpcb_input.cpp:56
mbench_insert_only_input_t()
Definition: tpcb_input.h:120
double balance
Definition: tpcb_input.h:164
Definition: tpcb_input.h:113
int a_id
Definition: tpcb_input.h:140
mbench_insert_probe_input_t()
Definition: tpcb_input.h:166
populate_db_input_t(int sf, int a_id)
Definition: tpcb_input.h:108
const int XCT_TPCB_MBENCH_DELETE_ONLY
Definition: tpcb_input.h:46
const int XCT_TPCB_MBENCH_INSERT_DELETE
Definition: tpcb_input.h:50
int b_id
Definition: tpcb_input.h:92
mbench_probe_only_input_t create_mbench_probe_only_input(int SF, int specificBr=0, int tspread=0)
Definition: tpcb_input.cpp:204
mbench_insert_probe_input_t create_mbench_insert_probe_input(int SF, int specificBr=0, int tspread=0)
Definition: tpcb_input.cpp:260
: Declaration of the (common) random functions, used for the workload inputs
double balance
Definition: tpcb_input.h:130
Definition: tpcb_input.h:65
Definition: tpcb_input.h:91
mbench_mix_input_t()
Definition: tpcb_input.h:186