17
17
18
18
int main (int argc, char * argv[]) {
19
19
std::string loc =
20
- " /home/prithviraj/Documents/Hamband/wellcoordination/workload /" ;
20
+ " /home/pyuvaraj /" ;
21
21
22
22
int nr_procs = static_cast <int >(std::atoi (argv[1 ]));
23
23
int num_ops = static_cast <int >(std::atoi (argv[2 ]));
@@ -94,11 +94,11 @@ int main(int argc, char* argv[]) {
94
94
int count = 0 ;
95
95
for (; count < expected_calls_per_update_method;) {
96
96
// storeBuyNow
97
- // Sell items with id 0 - 99.
97
+ // Buy items with id 0 - 99. 0-5
98
98
std::string callStr;
99
99
if (type == 0 ) {
100
100
std::string i_id = std::to_string (std::rand () % 100 );
101
- std::string value = std::to_string (std::rand () % 1000 );
101
+ std::string value = std::to_string (std::rand () % 5 );
102
102
callStr = " 1 " + i_id + " -" + value;
103
103
}
104
104
MethodCall call = ReplicatedObject::createCall (" id" , callStr);
@@ -136,8 +136,6 @@ int main(int argc, char* argv[]) {
136
136
for (int type = 0 ; type <= 1 ; type++) {
137
137
int count = 0 ;
138
138
for (; count < expected_calls_per_update_method;) {
139
- // registerUser
140
- // add users from 100 - 199.
141
139
std::string callStr;
142
140
if (type == 0 ) {
143
141
// placeBid
@@ -150,11 +148,11 @@ int main(int argc, char* argv[]) {
150
148
}
151
149
if (type == 1 ) {
152
150
// Close Auctions
153
- std::string i_id = std::to_string (100 + std::rand () % 100 ); // auction id
151
+ std::string i_id = std::to_string (std::rand () % 100 ); // auction id
154
152
// std::string stock = std::to_string(1 + std::rand() % 1000); //stock
155
153
156
154
// open[i - 1].push_back(i_id);
157
- callStr = " 5 " + i_id
155
+ callStr = " 5 " + i_id;
158
156
}
159
157
MethodCall call = ReplicatedObject::createCall (" id" , callStr);
160
158
if (test->isPermissible (call)) {
@@ -173,12 +171,11 @@ int main(int argc, char* argv[]) {
173
171
expected_nonconflicting_write_calls_per_follower; count++) {
174
172
std::string callStr;
175
173
if (type == 0 ) {
176
- // sellitem
177
- std::string s_id = std::to_string (100 + std::rand () % 100 );
178
- std::string value = std::to_string (std::rand () % 1000 );
179
- callStr = " 0 " + s_id+ " -" + value;
174
+ // sellitem
175
+ std::string s_id = std::to_string (100 + std::rand () % 100 );
176
+ std::string value = std::to_string (std::rand () % 1000 );
177
+ callStr = " 0 " + s_id+ " -" + value;
180
178
}
181
-
182
179
if (type == 1 ) {
183
180
// Open Auctions
184
181
// Open 100 - 199, with different stock values
0 commit comments