aboutsummaryrefslogtreecommitdiff
path: root/src/setu/perf_setu_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/setu/perf_setu_api.c')
-rw-r--r--src/setu/perf_setu_api.c36
1 files changed, 23 insertions, 13 deletions
diff --git a/src/setu/perf_setu_api.c b/src/setu/perf_setu_api.c
index 710e75381..4069056fc 100644
--- a/src/setu/perf_setu_api.c
+++ b/src/setu/perf_setu_api.c
@@ -50,6 +50,7 @@ static int ret;
50static struct GNUNET_SCHEDULER_Task *tt; 50static struct GNUNET_SCHEDULER_Task *tt;
51 51
52 52
53
53static void 54static void
54result_cb_set1 (void *cls, 55result_cb_set1 (void *cls,
55 const struct GNUNET_SETU_Element *element, 56 const struct GNUNET_SETU_Element *element,
@@ -394,25 +395,34 @@ run (void *cls,
394 "Running real set-reconciliation\n"); 395 "Running real set-reconciliation\n");
395 //init_set1 (); 396 //init_set1 ();
396 // limit ~23800 element total 397 // limit ~23800 element total
397 initRandomSets(19500,20000,20000,32); 398 initRandomSets(95,100,100,32);
398} 399}
399 400
401static void execute_perf()
402{
403 for( int repeat_ctr = 0; repeat_ctr<100; repeat_ctr++ ) {
404
405 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
406 "Executing perf round %d\n", repeat_ctr);
407
408 GNUNET_TESTING_service_run ("perf_setu_api",
409 "arm",
410 "test_setu.conf",
411 &run,
412 NULL);
413 }
414 return 0;
415}
416
417
400 418
401int 419int
402main (int argc, char **argv) 420main (int argc, char **argv)
403{ 421{
404 GNUNET_log_setup ("test_setu_api", 422 GNUNET_log_setup ("perf_setu_api",
405 "WARNING", 423 "WARNING",
406 NULL); 424 NULL);
407 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 425
408 "Launching peer\n"); 426 execute_perf();
409 if (0 != 427 return 0;
410 GNUNET_TESTING_peer_run ("test_setu_api",
411 "test_setu.conf",
412 &run,
413 NULL))
414 {
415 return 1;
416 }
417 return ret;
418} 428}