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