@@ -125,7 +125,7 @@ client::client(struct event_base *event_base, benchmark_config *config,
125
125
if (!setup_client (config, protocol, obj_gen)) {
126
126
return ;
127
127
}
128
-
128
+
129
129
benchmark_debug_log (" new client %p successfully set up.\n " , this );
130
130
m_initialized = true ;
131
131
}
@@ -203,7 +203,7 @@ bool client::finished(void)
203
203
return true ;
204
204
if (m_config->test_time > 0 && m_stats.get_duration () >= m_config->test_time )
205
205
return true ;
206
- return false ;
206
+ return false ;
207
207
}
208
208
209
209
void client::set_start_time () {
@@ -333,7 +333,7 @@ void client::create_request(struct timeval timestamp, unsigned int conn_id)
333
333
334
334
assert (key != NULL );
335
335
assert (keylen > 0 );
336
-
336
+
337
337
m_keylist->add_key (key, keylen);
338
338
}
339
339
@@ -353,14 +353,14 @@ void client::create_request(struct timeval timestamp, unsigned int conn_id)
353
353
} else {
354
354
// overlap counters
355
355
m_get_ratio_count = m_set_ratio_count = 0 ;
356
- }
356
+ }
357
357
}
358
358
359
359
int client::prepare (void )
360
360
{
361
361
if (MAIN_CONNECTION == NULL )
362
362
return -1 ;
363
-
363
+
364
364
int ret = this ->connect ();
365
365
if (ret < 0 ) {
366
366
benchmark_error_log (" prepare: failed to connect, test aborted.\n " );
@@ -522,7 +522,7 @@ bool verify_client::finished(void)
522
522
523
523
// /////////////////////////////////////////////////////////////////////////
524
524
525
- client_group::client_group (benchmark_config* config, abstract_protocol *protocol, object_generator* obj_gen) :
525
+ client_group::client_group (benchmark_config* config, abstract_protocol *protocol, object_generator* obj_gen) :
526
526
m_base(NULL ), m_config(config), m_protocol(protocol), m_obj_gen(obj_gen)
527
527
{
528
528
m_base = event_base_new ();
@@ -561,7 +561,7 @@ int client_group::create_clients(int num)
561
561
delete c;
562
562
return i;
563
563
}
564
-
564
+
565
565
m_clients.push_back (c);
566
566
}
567
567
@@ -625,14 +625,14 @@ unsigned long int client_group::get_duration_usec(void)
625
625
float factor = ((float )(thread_counter - 1 ) / thread_counter);
626
626
duration = factor * duration + (float )(*i)->get_stats ()->get_duration_usec () / thread_counter ;
627
627
}
628
-
628
+
629
629
return duration;
630
630
}
631
631
632
632
void client_group::merge_run_stats (run_stats* target)
633
633
{
634
634
assert (target != NULL );
635
- unsigned int iteration_counter = 1 ;
635
+ unsigned int iteration_counter = 1 ;
636
636
for (std::vector<client*>::iterator i = m_clients.begin (); i != m_clients.end (); i++) {
637
637
target->merge (*(*i)->get_stats (), iteration_counter++);
638
638
}
@@ -649,5 +649,5 @@ void client_group::write_client_stats(const char *prefix)
649
649
if (!(*i)->get_stats ()->save_csv (filename, m_config)) {
650
650
fprintf (stderr, " error: %s: failed to write client stats.\n " , filename);
651
651
}
652
- }
652
+ }
653
653
}
0 commit comments