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.c29
1 files changed, 27 insertions, 2 deletions
diff --git a/src/setu/perf_setu_api.c b/src/setu/perf_setu_api.c
index 3b82e8af9..ef20b48ce 100644
--- a/src/setu/perf_setu_api.c
+++ b/src/setu/perf_setu_api.c
@@ -50,6 +50,13 @@ static int ret;
50static struct GNUNET_SCHEDULER_Task *tt; 50static struct GNUNET_SCHEDULER_Task *tt;
51 51
52 52
53/**
54 * Handles configuration file for setu performance test
55 *
56 */
57static const struct GNUNET_CONFIGURATION_Handle *setu_cfg;
58
59
53 60
54static void 61static void
55result_cb_set1 (void *cls, 62result_cb_set1 (void *cls,
@@ -395,12 +402,30 @@ run (void *cls,
395 "Running real set-reconciliation\n"); 402 "Running real set-reconciliation\n");
396 //init_set1 (); 403 //init_set1 ();
397 // limit ~23800 element total 404 // limit ~23800 element total
398 initRandomSets(50,100,100,128); 405 initRandomSets(475,500,500,32);
399} 406}
400 407
401static void execute_perf() 408static void execute_perf()
402{ 409{
403 for( int repeat_ctr = 0; repeat_ctr<1; repeat_ctr++ ) { 410 setu_cfg = GNUNET_CONFIGURATION_create ();
411 GNUNET_CONFIGURATION_set_value_number (setu_cfg, "IBF", "BUCKET_NUMBER", 5);
412 GNUNET_CONFIGURATION_set_value_number (setu_cfg, "IBF", "NUMBER_PER_BUCKET", 4);
413 GNUNET_CONFIGURATION_set_value_string (setu_cfg, "PERFORMANCE", "TRADEOFF", "0.25");
414 GNUNET_CONFIGURATION_set_value_string (setu_cfg, "PERFORMANCE", "MAX_SET_DIFF_FACTOR_DIFFERENTIAL", "0.25");
415
416 /**
417 * Erase statfile
418 */
419 remove("perfstats.log");
420 //FILE *out = fopen("perfstats.log", "w");
421 //fprintf(out, "se_diff,active_passive_switches,bytes_transmitted,rtt\n");
422
423 if (GNUNET_OK != GNUNET_CONFIGURATION_write (setu_cfg, "/tmp/perf_setu.conf"))
424 GNUNET_log (
425 GNUNET_ERROR_TYPE_ERROR,
426 _ ("Failed to write subsystem default identifier map to `%s'.\n"),
427 setu_cfg);
428 for( int repeat_ctr = 0; repeat_ctr<100; repeat_ctr++ ) {
404 429
405 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 430 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
406 "Executing perf round %d\n", repeat_ctr); 431 "Executing perf round %d\n", repeat_ctr);