19 std::mt19937 rand_generator;
21 static constexpr int STOCK_LEVEL_ORDERS = 20;
22 static constexpr float MIN_PAYMENT_AMOUNT = 1.00;
23 static constexpr float MAX_PAYMENT_AMOUNT = 5000.00;
24 static constexpr int32_t MAX_OL_QUANTITY = 10;
25 static constexpr int32_t INVALID_QUANTITY = -1;
26 static constexpr char INVALID_ITEM_STATUS[] =
"Item number is not valid";
28 District find_district(int32_t w_id, int32_t d_id)
33 auto districts = districts_table->get(key);
35 if (!districts.has_value())
37 throw std::logic_error(
"district does not exist");
39 return districts.value();
42 std::optional<OrderLine> find_order_line(
43 int32_t w_id, int32_t d_id, int32_t o_id, int32_t number)
47 return order_lines_table->get(key);
50 std::optional<Item> find_item(int32_t
id)
54 return items_table->get(key);
57 Stock find_stock(int32_t w_id, int32_t s_id)
61 auto stock = stocks_table->get(key);
62 if (!stock.has_value())
64 throw std::logic_error(
"stock does not exist");
69 Customer find_customer(int32_t w_id, int32_t d_id, int32_t c_id)
72 table_key.
v.
w_id = w_id;
73 table_key.
v.
d_id = d_id;
76 auto customers_table = args.
tx.
ro(it->second);
77 auto customers = customers_table->get(key);
78 if (!customers.has_value())
80 throw std::logic_error(
"customers does not exist");
82 return customers.value();
89 auto warehouse = warehouses_table->get(key);
90 if (!warehouse.has_value())
92 throw std::logic_error(
"warehouse does not exist");
94 return warehouse.value();
97 void insert_order(
Order& o)
103 auto orders_table = args.
tx.
rw(it->second);
104 orders_table->put(o.
get_key(), o);
107 void insert_new_order(int32_t w_id, int32_t d_id, int32_t o_id)
115 table_key.
v.
w_id = w_id;
116 table_key.
v.
d_id = d_id;
119 auto new_orders_table = args.
tx.
rw(it->second);
120 new_orders_table->put(no.
get_key(), no);
126 order_lines->put(line.
get_key(), line);
130 int32_t warehouse_id,
135 auto customer = find_customer(warehouse_id, district_id, customer_id);
136 internal_order_status(customer, output);
140 int32_t w_id, int32_t d_id,
const char* c_last)
144 table_key.
v.
w_id = w_id;
145 table_key.
v.
d_id = d_id;
147 auto customers_table = args.
tx.
ro(it->second);
149 if (strcmp(c.
last.data(), c_last) == 0)
160 int32_t warehouse_id,
166 find_customer_by_name(warehouse_id, district_id, c_last);
167 internal_order_status(customer, output);
170 Order find_last_order_by_customer(
171 const int32_t w_id,
const int32_t d_id,
const int32_t c_id)
176 table_key.
v.
w_id = w_id;
177 table_key.
v.
d_id = d_id;
180 auto orders_table = args.
tx.
ro(it->second);
195 output->
c_id = customer.
id;
204 find_last_order_by_customer(customer.
w_id, customer.
d_id, customer.
id);
210 for (int32_t line_number = 1; line_number <= order.
ol_cnt; ++line_number)
213 find_order_line(customer.
w_id, customer.
d_id, order.
id, line_number)
215 output->
lines[line_number - 1].i_id = line.
i_id;
218 output->
lines[line_number - 1].amount = line.
amount;
223 int32_t generate_item_id()
225 return random_int(1, num_items);
228 int32_t generate_warehouse()
230 return random_int(1, num_warehouses);
233 int32_t generate_district()
235 return random_int(1, districts_per_warehouse);
238 int32_t generate_cid()
240 return random_int(1, customers_per_district);
243 Order find_order(int32_t w_id, int32_t d_id, int32_t o_id)
246 table_key.
v.
w_id = w_id;
247 table_key.
v.
d_id = d_id;
250 auto orders_table = args.
tx.
ro(it->second);
252 auto order = orders_table->get(key);
253 return order.value();
257 int32_t warehouse_id,
259 std::array<char, DATETIME_SIZE + 1>& now,
260 std::vector<DeliveryOrderInfo>* orders)
265 table_key.
v.
w_id = warehouse_id;
266 table_key.
v.
d_id = d_id;
269 auto new_orders_table = args.
tx.
rw(it->second);
270 bool new_order_exists =
false;
273 new_orders_table->foreach(
277 new_order_exists =
true;
280 if (!new_order_exists)
284 new_orders_table->remove(new_order_key);
289 orders->push_back(order);
291 Order o = find_order(warehouse_id, d_id, o_id);
295 for (int32_t i = 1; i <= o.
ol_cnt; ++i)
297 std::optional<OrderLine> line =
298 find_order_line(warehouse_id, d_id, o_id, i);
299 line->delivery_d = now;
300 total += line->amount;
310 int32_t warehouse_id,
312 int32_t c_warehouse_id,
313 int32_t c_district_id,
316 std::array<char, DATETIME_SIZE + 1> now,
319 Warehouse w = find_warehouse(warehouse_id);
327 District d = find_district(warehouse_id, district_id);
338 h.
w_id = warehouse_id;
339 h.
d_id = district_id;
340 h.
c_w_id = c_warehouse_id;
342 h.
c_id = customer_id;
345 std::copy_n(h.
data.data(), w.
name.size(), w.
name.data());
349 history_table->put(h.
get_key(), h);
352 void internal_payment_remote(
353 int32_t warehouse_id,
366 std::array<char, HISTORY_SIZE> history;
367 int characters = snprintf(
370 "(%d, %d, %d, %d, %d, %.2f)\n",
379 int current_keep =
static_cast<int>(strlen(c.
data.data()));
384 memmove(c.
data.data() + characters, c.
data.data(), current_keep);
385 memcpy(c.
data.data(), history.data(), characters);
386 c.
data[characters + current_keep] =
'\0';
407 int32_t warehouse_id,
409 int32_t c_warehouse_id,
410 int32_t c_district_id,
413 std::array<char, DATETIME_SIZE + 1> now,
418 find_customer(c_warehouse_id, c_district_id, customer_id);
428 internal_payment_remote(
429 warehouse_id, district_id, customer, h_amount, output);
433 int32_t warehouse_id,
435 int32_t c_warehouse_id,
436 int32_t c_district_id,
437 std::array<char, Customer::MAX_LAST + 1> c_last,
439 std::array<char, DATETIME_SIZE + 1> now,
443 find_customer_by_name(c_warehouse_id, c_district_id, c_last.data());
453 internal_payment_remote(
454 warehouse_id, district_id, customer, h_amount, output);
457 void new_order_combine(
458 const std::vector<int32_t>& remote_quantities,
NewOrderOutput* output)
460 for (
size_t i = 0; i < remote_quantities.size(); ++i)
462 if (remote_quantities[i] != INVALID_QUANTITY)
464 output->
items[i].s_quantity = remote_quantities[i];
469 void new_order_combine(
470 const std::vector<int32_t>& remote_quantities,
471 std::vector<int32_t>* output)
473 for (
size_t i = 0; i < remote_quantities.size(); ++i)
475 if (remote_quantities[i] != INVALID_QUANTITY)
477 (*output)[i] = remote_quantities[i];
482 bool new_order_remote(
483 int32_t home_warehouse,
484 int32_t remote_warehouse,
485 const std::vector<NewOrderItem>& items,
486 std::vector<int32_t>* out_quantities)
488 out_quantities->resize(items.size());
489 for (uint32_t i = 0; i < items.size(); ++i)
492 if (items[i].ol_supply_w_id != remote_warehouse)
494 (*out_quantities)[i] = INVALID_QUANTITY;
499 Stock stock = find_stock(items[i].ol_supply_w_id, items[i].i_id);
500 if (stock.
quantity >= items[i].ol_quantity + 10)
502 stock.
quantity -= items[i].ol_quantity;
508 (*out_quantities)[i] = stock.
quantity;
509 stock.
ytd += items[i].ol_quantity;
512 if (items[i].ol_supply_w_id != home_warehouse)
521 std::set<int32_t> new_order_remote_warehouses(
522 int32_t home_warehouse,
const std::vector<NewOrderItem>& items)
524 std::set<int32_t> out;
525 for (
size_t i = 0; i < items.size(); ++i)
527 if (items[i].ol_supply_w_id != home_warehouse)
529 out.insert(items[i].ol_supply_w_id);
536 int32_t warehouse_id,
539 const std::vector<NewOrderItem>& items,
540 std::array<char, DATETIME_SIZE + 1> now,
544 bool result = new_order_home(
545 warehouse_id, district_id, customer_id, items, now, output);
552 std::set<int32_t> warehouses =
553 new_order_remote_warehouses(warehouse_id, items);
554 for (
auto i = warehouses.begin(); i != warehouses.end(); ++i)
556 std::vector<int32_t> quantities;
557 result = new_order_remote(warehouse_id, *i, items, &quantities);
559 new_order_combine(quantities, output);
565 bool find_and_validate_items(
566 const std::vector<NewOrderItem>& items,
567 std::vector<std::optional<Item>>* item_tuples)
570 item_tuples->resize(items.size());
571 for (uint32_t i = 0; i < items.size(); ++i)
573 (*item_tuples)[i] = find_item(items[i].i_id);
574 if (!(*item_tuples)[i].has_value())
583 int32_t warehouse_id,
586 const std::vector<NewOrderItem>& items,
587 std::array<char, DATETIME_SIZE + 1> now,
592 District d = find_district(warehouse_id, district_id);
596 Customer c = find_customer(warehouse_id, district_id, customer_id);
602 std::vector<std::optional<Item>> item_tuples(items.size());
603 if (!find_and_validate_items(items, &item_tuples))
605 strcpy(output->
status.data(), INVALID_ITEM_STATUS);
610 bool all_local =
true;
611 for (
size_t i = 0; i < items.size(); ++i)
613 if (items[i].ol_supply_w_id != warehouse_id)
623 Warehouse w = find_warehouse(warehouse_id);
627 order.
w_id = warehouse_id;
628 order.
d_id = district_id;
630 order.
c_id = customer_id;
632 order.
ol_cnt =
static_cast<int32_t
>(items.size());
636 insert_new_order(warehouse_id, district_id, output->
o_id);
640 line.
d_id = district_id;
641 line.
w_id = warehouse_id;
642 memset(line.
delivery_d.data(), 0, DATETIME_SIZE + 1);
644 output->
items.resize(items.size());
646 for (uint32_t i = 0; i < items.size(); ++i)
649 line.
i_id = items[i].i_id;
651 line.
quantity = items[i].ol_quantity;
653 Stock stock = find_stock(items[i].ol_supply_w_id, items[i].i_id);
656 stock.
dist[district_id].data(),
659 bool stock_is_original =
660 (strstr(stock.
data.data(),
"ORIGINAL") != NULL);
663 strstr(item_tuples[i]->data.data(),
"ORIGINAL") != NULL)
672 output->
items[i].i_name = item_tuples[i]->name;
673 output->
items[i].i_price = item_tuples[i]->price;
674 output->
items[i].ol_amount =
675 static_cast<float>(items[i].ol_quantity) * item_tuples[i]->price;
678 insert_order_line(line);
681 std::vector<int32_t> quantities;
682 new_order_remote(warehouse_id, warehouse_id, items, &quantities);
683 new_order_combine(quantities, output);
688 float random_float(
float min,
float max)
690 return tpcc::random_float(min, max, rand_generator);
693 uint32_t random_int(uint32_t min, uint32_t max)
695 return tpcc::random_int(min, max, rand_generator);
698 int32_t random_int_excluding(
int lower,
int upper,
int excluding)
700 return tpcc::random_int_excluding(
701 lower, upper, excluding, rand_generator);
708 rand_generator.seed(seed);
712 int32_t warehouse_id, int32_t district_id, int32_t threshold)
714 District d = find_district(warehouse_id, district_id);
717 std::vector<int32_t> s_i_ids;
718 s_i_ids.reserve(300);
720 for (
int order_id = o_id - STOCK_LEVEL_ORDERS; order_id < o_id;
726 std::optional<OrderLine> line_ret =
727 find_order_line(warehouse_id, district_id, order_id, line_number);
728 if (!line_ret.has_value())
732 auto& line = line_ret.value();
735 Stock stock = find_stock(warehouse_id, line.
i_id);
738 s_i_ids.push_back(line.
i_id);
743 std::sort(s_i_ids.begin(), s_i_ids.end());
744 int num_distinct = 0;
746 for (
size_t i = 0; i < s_i_ids.size(); ++i)
748 if (s_i_ids[i] != last)
760 int y = random_int(0, 100);
765 tpcc::make_last_name(random_int(1, customers_per_district), c_last);
766 uint32_t w_id = generate_warehouse();
767 uint32_t d_id = generate_district();
774 generate_warehouse(), generate_district(), generate_cid(), &output);
781 std::array<char, DATETIME_SIZE + 1> now = tx_time;
783 std::vector<DeliveryOrderInfo> orders;
784 delivery(generate_warehouse(), carrier, now, &orders);
790 int x = random_int(1, 100);
791 int y = random_int(1, 100);
793 int32_t w_id = generate_warehouse();
794 int32_t d_id = generate_district();
798 if (num_warehouses == 1 || x <= 85)
807 c_w_id = random_int_excluding(1, num_warehouses, w_id);
808 c_d_id = generate_district();
810 float h_amount = random_float(MIN_PAYMENT_AMOUNT, MAX_PAYMENT_AMOUNT);
812 std::array<char, DATETIME_SIZE + 1> now = tx_time;
816 std::array<char, Customer::MAX_LAST + 1> c_last;
817 make_last_name(random_int(1, customers_per_district), c_last.data());
818 payment(w_id, d_id, c_w_id, c_d_id, c_last, h_amount, now, &output);
824 w_id, d_id, c_w_id, c_d_id, generate_cid(), h_amount, now, &output);
830 int32_t w_id = generate_warehouse();
834 bool rollback = random_int(1, 100) == 1;
836 std::vector<NewOrderItem> items(ol_cnt);
837 for (
int i = 0; i < ol_cnt; ++i)
839 if (rollback && i + 1 == ol_cnt)
845 items[i].i_id = generate_item_id();
850 bool remote = (random_int(1, 100) == 1);
851 if (num_warehouses > 1 && remote)
853 items[i].ol_supply_w_id =
854 random_int_excluding(1, num_warehouses, w_id);
858 items[i].ol_supply_w_id = w_id;
860 items[i].ol_quantity = random_int(1, MAX_OL_QUANTITY);
863 std::array<char, DATETIME_SIZE + 1> now = tx_time;
866 w_id, generate_district(), generate_cid(), items, now, &output);
M::ReadOnlyHandle * ro(M &m)
Definition tx.h:170
M::Handle * rw(M &m)
Definition tx.h:213
Definition tpcc_transactions.h:16
void order_status()
Definition tpcc_transactions.h:757
bool new_order()
Definition tpcc_transactions.h:828
int32_t stock_level(int32_t warehouse_id, int32_t district_id, int32_t threshold)
Definition tpcc_transactions.h:711
void delivery()
Definition tpcc_transactions.h:778
void payment()
Definition tpcc_transactions.h:787
TpccTransactions(ccf::endpoints::EndpointContext &args_, uint32_t seed)
Definition tpcc_transactions.h:705
Definition tpcc_common.h:8
Definition endpoint_context.h:55
ccf::kv::Tx & tx
Definition endpoint_context.h:61
Definition tpcc_tables.h:334
Definition tpcc_tables.h:313
float balance
Definition tpcc_tables.h:348
std::array< char, CREDIT+1 > credit
Definition tpcc_tables.h:362
int32_t id
Definition tpcc_tables.h:343
std::array< char, MIDDLE+1 > middle
Definition tpcc_tables.h:353
std::array< char, MAX_DATA+1 > data
Definition tpcc_tables.h:363
float ytd_payment
Definition tpcc_tables.h:349
static const int MAX_LAST
Definition tpcc_tables.h:324
int32_t w_id
Definition tpcc_tables.h:345
int32_t payment_cnt
Definition tpcc_tables.h:350
std::array< char, Address::ZIP+1 > zip
Definition tpcc_tables.h:359
static constexpr char BAD_CREDIT[]
Definition tpcc_tables.h:331
std::array< char, Address::MAX_STREET+1 > street_1
Definition tpcc_tables.h:355
int32_t delivery_cnt
Definition tpcc_tables.h:351
std::array< char, Address::STATE+1 > state
Definition tpcc_tables.h:358
float credit_lim
Definition tpcc_tables.h:346
std::array< char, PHONE+1 > phone
Definition tpcc_tables.h:360
std::array< char, Address::MAX_CITY+1 > city
Definition tpcc_tables.h:357
float discount
Definition tpcc_tables.h:347
std::array< char, Address::MAX_STREET+1 > street_2
Definition tpcc_tables.h:356
std::array< char, DATETIME_SIZE+1 > since
Definition tpcc_tables.h:361
static const int MAX_DATA
Definition tpcc_tables.h:328
std::array< char, MAX_FIRST+1 > first
Definition tpcc_tables.h:352
std::array< char, MAX_LAST+1 > last
Definition tpcc_tables.h:354
int32_t d_id
Definition tpcc_tables.h:344
Definition tpcc_output.h:48
int32_t d_id
Definition tpcc_output.h:49
int32_t o_id
Definition tpcc_output.h:50
Definition tpcc_tables.h:236
Definition tpcc_tables.h:226
std::array< char, Address::MAX_STREET+1 > street_1
Definition tpcc_tables.h:247
static const int NUM_PER_WAREHOUSE
Definition tpcc_tables.h:233
std::array< char, Address::ZIP+1 > zip
Definition tpcc_tables.h:251
float tax
Definition tpcc_tables.h:243
int32_t next_o_id
Definition tpcc_tables.h:245
float ytd
Definition tpcc_tables.h:244
std::array< char, Address::STATE+1 > state
Definition tpcc_tables.h:250
std::array< char, Address::MAX_STREET+1 > street_2
Definition tpcc_tables.h:248
std::array< char, Address::MAX_CITY+1 > city
Definition tpcc_tables.h:249
Definition tpcc_tables.h:507
int32_t w_id
Definition tpcc_tables.h:530
Key get_key()
Definition tpcc_tables.h:521
int32_t c_id
Definition tpcc_tables.h:526
int32_t c_w_id
Definition tpcc_tables.h:528
int32_t d_id
Definition tpcc_tables.h:529
int32_t c_d_id
Definition tpcc_tables.h:527
std::array< char, MAX_DATA+1 > data
Definition tpcc_tables.h:533
std::array< char, DATETIME_SIZE+1 > date
Definition tpcc_tables.h:532
float amount
Definition tpcc_tables.h:531
Definition tpcc_tables.h:169
static const int NUM_ITEMS
Definition tpcc_tables.h:166
static const char GENERIC
Definition tpcc_output.h:102
static const char BRAND
Definition tpcc_output.h:101
Definition tpcc_output.h:85
std::array< char, MAX_STATUS+1 > status
Definition tpcc_output.h:117
std::array< char, Customer::CREDIT+1 > c_credit
Definition tpcc_output.h:113
std::array< char, Customer::MAX_LAST+1 > c_last
Definition tpcc_output.h:112
std::vector< ItemInfo > items
Definition tpcc_output.h:111
float w_tax
Definition tpcc_output.h:93
float d_tax
Definition tpcc_output.h:94
float total
Definition tpcc_output.h:97
float c_discount
Definition tpcc_output.h:96
int32_t o_id
Definition tpcc_output.h:95
Definition tpcc_tables.h:486
Definition tpcc_tables.h:482
int32_t w_id
Definition tpcc_tables.h:497
Key get_key()
Definition tpcc_tables.h:492
int32_t o_id
Definition tpcc_tables.h:499
int32_t d_id
Definition tpcc_tables.h:498
Definition tpcc_tables.h:441
Definition tpcc_tables.h:432
int32_t supply_w_id
Definition tpcc_tables.h:458
Key get_key()
Definition tpcc_tables.h:448
std::array< char, Stock::DIST+1 > dist_info
Definition tpcc_tables.h:462
int32_t o_id
Definition tpcc_tables.h:453
int32_t number
Definition tpcc_tables.h:456
std::array< char, DATETIME_SIZE+1 > delivery_d
Definition tpcc_tables.h:461
int32_t quantity
Definition tpcc_tables.h:459
int32_t d_id
Definition tpcc_tables.h:454
float amount
Definition tpcc_tables.h:460
int32_t i_id
Definition tpcc_tables.h:457
int32_t w_id
Definition tpcc_tables.h:455
Definition tpcc_output.h:54
int32_t c_id
Definition tpcc_output.h:55
int32_t o_id
Definition tpcc_output.h:58
float c_balance
Definition tpcc_output.h:56
std::array< char, Customer::MIDDLE+1 > c_middle
Definition tpcc_output.h:72
int32_t o_carrier_id
Definition tpcc_output.h:59
std::array< char, Customer::MAX_FIRST+1 > c_first
Definition tpcc_output.h:71
std::array< char, Customer::MAX_LAST+1 > c_last
Definition tpcc_output.h:73
std::vector< OrderLineSubset > lines
Definition tpcc_output.h:70
std::array< char, DATETIME_SIZE+1 > o_entry_d
Definition tpcc_output.h:74
Definition tpcc_tables.h:407
Definition tpcc_tables.h:394
Key get_key()
Definition tpcc_tables.h:411
int32_t w_id
Definition tpcc_tables.h:419
int32_t carrier_id
Definition tpcc_tables.h:420
int32_t c_id
Definition tpcc_tables.h:417
static const int MAX_OL_CNT
Definition tpcc_tables.h:400
int32_t id
Definition tpcc_tables.h:416
std::array< char, DATETIME_SIZE+1 > entry_d
Definition tpcc_tables.h:423
static const int MAX_CARRIER_ID
Definition tpcc_tables.h:396
int32_t d_id
Definition tpcc_tables.h:418
int32_t all_local
Definition tpcc_tables.h:422
static const int MIN_CARRIER_ID
Definition tpcc_tables.h:395
static const int MIN_OL_CNT
Definition tpcc_tables.h:399
static const int NULL_CARRIER_ID
Definition tpcc_tables.h:397
int32_t ol_cnt
Definition tpcc_tables.h:421
Definition tpcc_output.h:16
std::array< char, Address::MAX_STREET+1 > d_street_2
Definition tpcc_output.h:25
std::array< char, Address::MAX_STREET+1 > w_street_1
Definition tpcc_output.h:18
std::array< char, Customer::MIDDLE+1 > c_middle
Definition tpcc_output.h:34
std::array< char, Customer::PHONE+1 > c_phone
Definition tpcc_output.h:41
std::array< char, Address::MAX_CITY+1 > c_city
Definition tpcc_output.h:38
std::array< char, Address::ZIP+1 > c_zip
Definition tpcc_output.h:40
std::array< char, Address::MAX_STREET+1 > c_street_1
Definition tpcc_output.h:36
std::array< char, Address::MAX_STREET+1 > c_street_2
Definition tpcc_output.h:37
std::array< char, Address::ZIP+1 > d_zip
Definition tpcc_output.h:28
std::array< char, Customer::MAX_FIRST+1 > c_first
Definition tpcc_output.h:33
std::array< char, Address::MAX_CITY+1 > w_city
Definition tpcc_output.h:20
std::array< char, DATETIME_SIZE+1 > c_since
Definition tpcc_output.h:42
std::array< char, Address::STATE+1 > d_state
Definition tpcc_output.h:27
float c_discount
Definition tpcc_output.h:31
std::array< char, Address::STATE+1 > c_state
Definition tpcc_output.h:39
std::array< char, Address::MAX_STREET+1 > w_street_2
Definition tpcc_output.h:19
std::array< char, Address::MAX_CITY+1 > d_city
Definition tpcc_output.h:26
std::array< char, Address::MAX_STREET+1 > d_street_1
Definition tpcc_output.h:24
std::array< char, Customer::CREDIT+1 > c_credit
Definition tpcc_output.h:43
std::array< char, Customer::MAX_LAST+1 > c_last
Definition tpcc_output.h:35
std::array< char, Address::ZIP+1 > w_zip
Definition tpcc_output.h:22
float c_balance
Definition tpcc_output.h:32
float c_credit_lim
Definition tpcc_output.h:30
std::array< char, Address::STATE+1 > w_state
Definition tpcc_output.h:21
std::array< char, Customer::MAX_DATA+1 > c_data
Definition tpcc_output.h:44
Definition tpcc_tables.h:296
Definition tpcc_tables.h:277
int32_t ytd
Definition tpcc_tables.h:288
int32_t order_cnt
Definition tpcc_tables.h:289
int32_t quantity
Definition tpcc_tables.h:287
std::array< std::array< char, DIST+1 >, District::NUM_PER_WAREHOUSE > dist
Definition tpcc_tables.h:291
int32_t remote_cnt
Definition tpcc_tables.h:290
std::array< char, MAX_DATA+1 > data
Definition tpcc_tables.h:293
static std::unordered_map< uint64_t, TpccMap< Order::Key, Order > > orders
Definition tpcc_tables.h:565
static TpccMap< Stock::Key, Stock > stocks
Definition tpcc_tables.h:559
static std::unordered_map< uint64_t, TpccMap< NewOrder::Key, NewOrder > > new_orders
Definition tpcc_tables.h:568
static TpccMap< District::Key, District > districts
Definition tpcc_tables.h:561
static TpccMap< OrderLine::Key, OrderLine > order_lines
Definition tpcc_tables.h:566
static TpccMap< History::Key, History > histories
Definition tpcc_tables.h:562
static TpccMap< Warehouse::Key, Warehouse > warehouses
Definition tpcc_tables.h:560
static std::unordered_map< uint64_t, TpccMap< Customer::Key, Customer > > customers
Definition tpcc_tables.h:564
static TpccMap< Item::Key, Item > items
Definition tpcc_tables.h:569
Definition tpcc_tables.h:200
Definition tpcc_tables.h:190
std::array< char, Address::ZIP+1 > zip
Definition tpcc_tables.h:217
std::array< char, MAX_NAME+1 > name
Definition tpcc_tables.h:212
float ytd
Definition tpcc_tables.h:211
std::array< char, Address::MAX_STREET+1 > city
Definition tpcc_tables.h:215
std::array< char, Address::MAX_STREET+1 > street_2
Definition tpcc_tables.h:214
std::array< char, Address::STATE+1 > state
Definition tpcc_tables.h:216
float tax
Definition tpcc_tables.h:210
std::array< char, Address::MAX_STREET+1 > street_1
Definition tpcc_tables.h:213
Definition tpcc_tables.h:547
int32_t d_id
Definition tpcc_tables.h:551
int32_t w_id
Definition tpcc_tables.h:550
struct tpcc::TpccTables::DistributeKey::@2 v
uint64_t k
Definition tpcc_tables.h:553