Zero  0.1.0
tpcc_client.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 
31 #ifndef __TPCC_CLIENT_H
32 #define __TPCC_CLIENT_H
33 
34 #include "shore_client.h"
35 
36 #include "tpcc/tpcc_const.h"
37 #include "tpcc/tpcc_env.h"
38 
39 namespace tpcc {
40 
41 /********************************************************************
42  *
43  * @enum: baseline_tpcc_client_t
44  *
45  * @brief: The Baseline TPC-C kit smthread-based test client class
46  *
47  ********************************************************************/
48 
50  private:
51  // workload parameters
52  int _wh;
53 
55 
56  double _qf;
57 
58  int _tspread;
59 
60  public:
61 
63 
64  baseline_tpcc_client_t(std::string tname, const int id, ShoreTPCCEnv* env,
65  const MeasurementType aType, const int trxid,
66  const int numOfTrxs,
67  const int sWH, const double qf,
68  int tspread);
69 
71 
72  // every client class should implement this function
73  static int load_sup_xct(mapSupTrxs& map);
74 
75  // INTERFACE
76 
77  w_rc_t submit_one(int xct_type, int xctid);
78  }; // EOF: baseline_tpcc_client_t
79 
80 
81 };
82 
83 #endif // __TPCC_CLIENT_H
: Constants needed by the TPC-C kit
~baseline_tpcc_client_t()
Definition: tpcc_client.h:70
MeasurementType
Definition: shore_client.h:108
map< int, string > mapSupTrxs
Definition: shore_client.h:128
Definition: trx_worker.h:596
Definition: shore_client.h:124
Definition: tpcc_client.cpp:33
: Wrapper for Shore client threads
int _tspread
Definition: tpcc_client.h:58
w_rc_t submit_one(int xct_type, int xctid)
Definition: tpcc_client.cpp:93
Return code for most functions and methods.
Definition: w_rc.h:87
double _qf
Definition: tpcc_client.h:56
Definition: tpcc_env.h:156
static int load_sup_xct(mapSupTrxs &map)
Definition: tpcc_client.cpp:61
int _wh
Definition: tpcc_client.h:52
baseline_tpcc_client_t()
Definition: tpcc_client.h:62
Definition: tpcc_client.h:49
trx_worker_t * _worker
Definition: tpcc_client.h:54
: Definition of the Shore TPC-C environment