diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-10-31 13:03:48 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-10-31 13:03:48 +0100 |
commit | 7e3cf5f461eb4fbb7581672bf0835da07c378136 (patch) | |
tree | bdc3874b7894242b095b892f1ed3e81a4d4f06c0 /src/ats-tests | |
parent | 01b480d6d026e0c537dc284a7e7df2c0320a3528 (diff) | |
download | gnunet-7e3cf5f461eb4fbb7581672bf0835da07c378136.tar.gz gnunet-7e3cf5f461eb4fbb7581672bf0835da07c378136.zip |
tighten formatting rules
Diffstat (limited to 'src/ats-tests')
-rw-r--r-- | src/ats-tests/ats-testing-experiment.c | 9 | ||||
-rw-r--r-- | src/ats-tests/ats-testing-log.c | 6 | ||||
-rw-r--r-- | src/ats-tests/ats-testing-preferences.c | 1 | ||||
-rw-r--r-- | src/ats-tests/ats-testing-traffic.c | 1 | ||||
-rw-r--r-- | src/ats-tests/ats-testing.c | 1 | ||||
-rw-r--r-- | src/ats-tests/gnunet-ats-sim.c | 11 | ||||
-rw-r--r-- | src/ats-tests/gnunet-solver-eval.c | 25 | ||||
-rw-r--r-- | src/ats-tests/perf_ats.c | 3 | ||||
-rw-r--r-- | src/ats-tests/perf_ats_logging.c | 5 |
9 files changed, 42 insertions, 20 deletions
diff --git a/src/ats-tests/ats-testing-experiment.c b/src/ats-tests/ats-testing-experiment.c index 676021926..fa379200f 100644 --- a/src/ats-tests/ats-testing-experiment.c +++ b/src/ats-tests/ats-testing-experiment.c | |||
@@ -65,6 +65,7 @@ create_experiment () | |||
65 | return e; | 65 | return e; |
66 | } | 66 | } |
67 | 67 | ||
68 | |||
68 | static void | 69 | static void |
69 | free_experiment (struct Experiment *e) | 70 | free_experiment (struct Experiment *e) |
70 | { | 71 | { |
@@ -509,6 +510,7 @@ enforce_start_send (struct GNUNET_ATS_TEST_Operation *op) | |||
509 | GNUNET_TIME_UNIT_FOREVER_REL); | 510 | GNUNET_TIME_UNIT_FOREVER_REL); |
510 | } | 511 | } |
511 | 512 | ||
513 | |||
512 | static void | 514 | static void |
513 | enforce_stop_send (struct GNUNET_ATS_TEST_Operation *op) | 515 | enforce_stop_send (struct GNUNET_ATS_TEST_Operation *op) |
514 | { | 516 | { |
@@ -572,6 +574,7 @@ enforce_start_preference (struct GNUNET_ATS_TEST_Operation *op) | |||
572 | op->pref_type); | 574 | op->pref_type); |
573 | } | 575 | } |
574 | 576 | ||
577 | |||
575 | static void | 578 | static void |
576 | enforce_stop_preference (struct GNUNET_ATS_TEST_Operation *op) | 579 | enforce_stop_preference (struct GNUNET_ATS_TEST_Operation *op) |
577 | { | 580 | { |
@@ -595,7 +598,9 @@ enforce_stop_preference (struct GNUNET_ATS_TEST_Operation *op) | |||
595 | } | 598 | } |
596 | } | 599 | } |
597 | 600 | ||
598 | static void enforce_episode (struct Episode *ep) | 601 | |
602 | static void | ||
603 | enforce_episode (struct Episode *ep) | ||
599 | { | 604 | { |
600 | struct GNUNET_ATS_TEST_Operation *cur; | 605 | struct GNUNET_ATS_TEST_Operation *cur; |
601 | 606 | ||
@@ -794,6 +799,7 @@ GNUNET_ATS_TEST_experimentation_load (const char *filename) | |||
794 | return e; | 799 | return e; |
795 | } | 800 | } |
796 | 801 | ||
802 | |||
797 | void | 803 | void |
798 | GNUNET_ATS_TEST_experimentation_stop (struct Experiment *e) | 804 | GNUNET_ATS_TEST_experimentation_stop (struct Experiment *e) |
799 | { | 805 | { |
@@ -810,4 +816,5 @@ GNUNET_ATS_TEST_experimentation_stop (struct Experiment *e) | |||
810 | free_experiment (e); | 816 | free_experiment (e); |
811 | } | 817 | } |
812 | 818 | ||
819 | |||
813 | /* end of file ats-testing-experiment.c*/ | 820 | /* end of file ats-testing-experiment.c*/ |
diff --git a/src/ats-tests/ats-testing-log.c b/src/ats-tests/ats-testing-log.c index 12a08ffda..38094a438 100644 --- a/src/ats-tests/ats-testing-log.c +++ b/src/ats-tests/ats-testing-log.c | |||
@@ -246,7 +246,6 @@ struct LoggingHandle | |||
246 | }; | 246 | }; |
247 | 247 | ||
248 | 248 | ||
249 | |||
250 | static void | 249 | static void |
251 | write_throughput_gnuplot_script (char *fn, struct LoggingPeer *lp, char **fs, | 250 | write_throughput_gnuplot_script (char *fn, struct LoggingPeer *lp, char **fs, |
252 | int slaves) | 251 | int slaves) |
@@ -380,6 +379,7 @@ write_rtt_gnuplot_script (char *fn, struct LoggingPeer *lp, char **fs, int | |||
380 | GNUNET_free (gfn); | 379 | GNUNET_free (gfn); |
381 | } | 380 | } |
382 | 381 | ||
382 | |||
383 | static void | 383 | static void |
384 | write_bw_gnuplot_script (char *fn, struct LoggingPeer *lp, char **fs, int | 384 | write_bw_gnuplot_script (char *fn, struct LoggingPeer *lp, char **fs, int |
385 | slaves) | 385 | slaves) |
@@ -664,6 +664,7 @@ GNUNET_ATS_TEST_logging_write_to_file (struct LoggingHandle *l, | |||
664 | GNUNET_free (filename_master); | 664 | GNUNET_free (filename_master); |
665 | } | 665 | } |
666 | 666 | ||
667 | |||
667 | /** | 668 | /** |
668 | * Log all data now | 669 | * Log all data now |
669 | * | 670 | * |
@@ -895,6 +896,7 @@ GNUNET_ATS_TEST_logging_stop (struct LoggingHandle *l) | |||
895 | _ ("Stop logging\n")); | 896 | _ ("Stop logging\n")); |
896 | } | 897 | } |
897 | 898 | ||
899 | |||
898 | /** | 900 | /** |
899 | * Clean up logging data | 901 | * Clean up logging data |
900 | * | 902 | * |
@@ -969,4 +971,6 @@ GNUNET_ATS_TEST_logging_start (struct GNUNET_TIME_Relative log_frequency, | |||
969 | 971 | ||
970 | return l; | 972 | return l; |
971 | } | 973 | } |
974 | |||
975 | |||
972 | /* end of file ats-testing-log.c */ | 976 | /* end of file ats-testing-log.c */ |
diff --git a/src/ats-tests/ats-testing-preferences.c b/src/ats-tests/ats-testing-preferences.c index 8138b18bb..f30fde960 100644 --- a/src/ats-tests/ats-testing-preferences.c +++ b/src/ats-tests/ats-testing-preferences.c | |||
@@ -261,4 +261,5 @@ GNUNET_ATS_TEST_generate_preferences_stop_all () | |||
261 | } | 261 | } |
262 | } | 262 | } |
263 | 263 | ||
264 | |||
264 | /* end of file ats-testing-preferences.c */ | 265 | /* end of file ats-testing-preferences.c */ |
diff --git a/src/ats-tests/ats-testing-traffic.c b/src/ats-tests/ats-testing-traffic.c index 14a8fe327..f19eac871 100644 --- a/src/ats-tests/ats-testing-traffic.c +++ b/src/ats-tests/ats-testing-traffic.c | |||
@@ -389,4 +389,5 @@ GNUNET_ATS_TEST_generate_traffic_stop_all () | |||
389 | } | 389 | } |
390 | } | 390 | } |
391 | 391 | ||
392 | |||
392 | /* end of file ats-testing-traffic.c */ | 393 | /* end of file ats-testing-traffic.c */ |
diff --git a/src/ats-tests/ats-testing.c b/src/ats-tests/ats-testing.c index 88c1729a6..c7969cdfe 100644 --- a/src/ats-tests/ats-testing.c +++ b/src/ats-tests/ats-testing.c | |||
@@ -738,7 +738,6 @@ do_connect_ats (void *cls) | |||
738 | } | 738 | } |
739 | 739 | ||
740 | 740 | ||
741 | |||
742 | static void | 741 | static void |
743 | peerinformation_cb (void *cb_cls, | 742 | peerinformation_cb (void *cb_cls, |
744 | struct GNUNET_TESTBED_Operation *op, | 743 | struct GNUNET_TESTBED_Operation *op, |
diff --git a/src/ats-tests/gnunet-ats-sim.c b/src/ats-tests/gnunet-ats-sim.c index c9e7a6d9f..fb3014798 100644 --- a/src/ats-tests/gnunet-ats-sim.c +++ b/src/ats-tests/gnunet-ats-sim.c | |||
@@ -252,22 +252,19 @@ topology_setup_done (void *cls, | |||
252 | GNUNET_ATS_TEST_TG_CONSTANT, 1, 1, GNUNET_TIME_UNIT_SECONDS, | 252 | GNUNET_ATS_TEST_TG_CONSTANT, 1, 1, GNUNET_TIME_UNIT_SECONDS, |
253 | GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_MILLISECONDS, 250), | 253 | GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_MILLISECONDS, 250), |
254 | GNUNET_ATS_PREFERENCE_BANDWIDTH); | 254 | GNUNET_ATS_PREFERENCE_BANDWIDTH); |
255 | */ | 255 | *//* |
256 | /* | ||
257 | GNUNET_ATS_TEST_generate_preferences_start(&masters[0],&masters[0].partners[0], | 256 | GNUNET_ATS_TEST_generate_preferences_start(&masters[0],&masters[0].partners[0], |
258 | GNUNET_ATS_TEST_TG_LINEAR, 1, 50, | 257 | GNUNET_ATS_TEST_TG_LINEAR, 1, 50, |
259 | GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 2), | 258 | GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 2), |
260 | GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_MILLISECONDS, 250), | 259 | GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_MILLISECONDS, 250), |
261 | GNUNET_ATS_PREFERENCE_BANDWIDTH); | 260 | GNUNET_ATS_PREFERENCE_BANDWIDTH); |
262 | */ | 261 | *//* |
263 | /* | ||
264 | GNUNET_ATS_TEST_generate_preferences_start(&masters[0],&masters[0].partners[0], | 262 | GNUNET_ATS_TEST_generate_preferences_start(&masters[0],&masters[0].partners[0], |
265 | GNUNET_ATS_TEST_TG_RANDOM, 1, 50, | 263 | GNUNET_ATS_TEST_TG_RANDOM, 1, 50, |
266 | GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 2), | 264 | GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 2), |
267 | GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_MILLISECONDS, 250), | 265 | GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_MILLISECONDS, 250), |
268 | GNUNET_ATS_PREFERENCE_BANDWIDTH); | 266 | GNUNET_ATS_PREFERENCE_BANDWIDTH); |
269 | */ | 267 | *//* |
270 | /* | ||
271 | GNUNET_ATS_TEST_generate_preferences_start(&masters[0],&masters[0].partners[0], | 268 | GNUNET_ATS_TEST_generate_preferences_start(&masters[0],&masters[0].partners[0], |
272 | GNUNET_ATS_TEST_TG_SINUS, 10, 5, | 269 | GNUNET_ATS_TEST_TG_SINUS, 10, 5, |
273 | GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 5), | 270 | GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 5), |
@@ -397,4 +394,6 @@ main (int argc, char *argv[]) | |||
397 | GNUNET_free (opt_exp_file); | 394 | GNUNET_free (opt_exp_file); |
398 | return 0; | 395 | return 0; |
399 | } | 396 | } |
397 | |||
398 | |||
400 | /* end of file gnunet-ats-sim.c */ | 399 | /* end of file gnunet-ats-sim.c */ |
diff --git a/src/ats-tests/gnunet-solver-eval.c b/src/ats-tests/gnunet-solver-eval.c index bc6a3c435..09ddd7b2d 100644 --- a/src/ats-tests/gnunet-solver-eval.c +++ b/src/ats-tests/gnunet-solver-eval.c | |||
@@ -408,6 +408,7 @@ load_episode (struct Experiment *e, | |||
408 | return GNUNET_OK; | 408 | return GNUNET_OK; |
409 | } | 409 | } |
410 | 410 | ||
411 | |||
411 | static int | 412 | static int |
412 | load_episodes (struct Experiment *e, struct GNUNET_CONFIGURATION_Handle *cfg) | 413 | load_episodes (struct Experiment *e, struct GNUNET_CONFIGURATION_Handle *cfg) |
413 | { | 414 | { |
@@ -517,8 +518,8 @@ enforce_start_send (struct GNUNET_ATS_TEST_Operation *op) | |||
517 | partner->tg = GNUNET_ATS_TEST_generate_traffic_start(peer, partner, | 518 | partner->tg = GNUNET_ATS_TEST_generate_traffic_start(peer, partner, |
518 | op->tg_type, op->base_rate, op->max_rate, op->period, | 519 | op->tg_type, op->base_rate, op->max_rate, op->period, |
519 | GNUNET_TIME_UNIT_FOREVER_REL); | 520 | GNUNET_TIME_UNIT_FOREVER_REL); |
520 | */ | 521 | */} |
521 | } | 522 | |
522 | 523 | ||
523 | static void | 524 | static void |
524 | enforce_stop_send (struct GNUNET_ATS_TEST_Operation *op) | 525 | enforce_stop_send (struct GNUNET_ATS_TEST_Operation *op) |
@@ -541,8 +542,7 @@ enforce_stop_send (struct GNUNET_ATS_TEST_Operation *op) | |||
541 | GNUNET_ATS_TEST_generate_traffic_stop(p->tg); | 542 | GNUNET_ATS_TEST_generate_traffic_stop(p->tg); |
542 | p->tg = NULL; | 543 | p->tg = NULL; |
543 | } | 544 | } |
544 | */ | 545 | */} |
545 | } | ||
546 | 546 | ||
547 | 547 | ||
548 | static void | 548 | static void |
@@ -579,8 +579,8 @@ enforce_start_preference (struct GNUNET_ATS_TEST_Operation *op) | |||
579 | partner->pg = GNUNET_ATS_TEST_generate_preferences_start(peer, partner, | 579 | partner->pg = GNUNET_ATS_TEST_generate_preferences_start(peer, partner, |
580 | op->tg_type, op->base_rate, op->max_rate, op->period, op->frequency, | 580 | op->tg_type, op->base_rate, op->max_rate, op->period, op->frequency, |
581 | op->pref_type); | 581 | op->pref_type); |
582 | */ | 582 | */} |
583 | } | 583 | |
584 | 584 | ||
585 | static void | 585 | static void |
586 | enforce_stop_preference (struct GNUNET_ATS_TEST_Operation *op) | 586 | enforce_stop_preference (struct GNUNET_ATS_TEST_Operation *op) |
@@ -603,10 +603,11 @@ enforce_stop_preference (struct GNUNET_ATS_TEST_Operation *op) | |||
603 | GNUNET_ATS_TEST_generate_preferences_stop (p->pg); | 603 | GNUNET_ATS_TEST_generate_preferences_stop (p->pg); |
604 | p->pg = NULL; | 604 | p->pg = NULL; |
605 | } | 605 | } |
606 | */ | 606 | */} |
607 | } | 607 | |
608 | 608 | ||
609 | static void enforce_episode (struct Episode *ep) | 609 | static void |
610 | enforce_episode (struct Episode *ep) | ||
610 | { | 611 | { |
611 | struct GNUNET_ATS_TEST_Operation *cur; | 612 | struct GNUNET_ATS_TEST_Operation *cur; |
612 | 613 | ||
@@ -805,6 +806,7 @@ GNUNET_ATS_solvers_experimentation_load (char *filename) | |||
805 | return e; | 806 | return e; |
806 | } | 807 | } |
807 | 808 | ||
809 | |||
808 | void | 810 | void |
809 | GNUNET_ATS_solvers_experimentation_stop (struct Experiment *e) | 811 | GNUNET_ATS_solvers_experimentation_stop (struct Experiment *e) |
810 | { | 812 | { |
@@ -821,6 +823,7 @@ GNUNET_ATS_solvers_experimentation_stop (struct Experiment *e) | |||
821 | free_experiment (e); | 823 | free_experiment (e); |
822 | } | 824 | } |
823 | 825 | ||
826 | |||
824 | /** | 827 | /** |
825 | * Solver | 828 | * Solver |
826 | */ | 829 | */ |
@@ -847,6 +850,7 @@ GNUNET_ATS_solvers_solver_stop (struct GNUNET_ATS_TESTING_SolverHandle *sh) | |||
847 | GNUNET_free (sh); | 850 | GNUNET_free (sh); |
848 | } | 851 | } |
849 | 852 | ||
853 | |||
850 | struct GNUNET_ATS_TESTING_SolverHandle * | 854 | struct GNUNET_ATS_TESTING_SolverHandle * |
851 | GNUNET_ATS_solvers_solver_start (enum GNUNET_ATS_Solvers type) | 855 | GNUNET_ATS_solvers_solver_start (enum GNUNET_ATS_Solvers type) |
852 | { | 856 | { |
@@ -885,6 +889,7 @@ GNUNET_ATS_solvers_solver_start (enum GNUNET_ATS_Solvers type) | |||
885 | return sh; | 889 | return sh; |
886 | } | 890 | } |
887 | 891 | ||
892 | |||
888 | static struct Experiment *e; | 893 | static struct Experiment *e; |
889 | 894 | ||
890 | static struct GNUNET_ATS_TESTING_SolverHandle *sh; | 895 | static struct GNUNET_ATS_TESTING_SolverHandle *sh; |
@@ -1015,4 +1020,6 @@ main (int argc, char *argv[]) | |||
1015 | 1020 | ||
1016 | return 0; | 1021 | return 0; |
1017 | } | 1022 | } |
1023 | |||
1024 | |||
1018 | /* end of file gnunet-solver-eval.c*/ | 1025 | /* end of file gnunet-solver-eval.c*/ |
diff --git a/src/ats-tests/perf_ats.c b/src/ats-tests/perf_ats.c index 470c687fc..64756b8aa 100644 --- a/src/ats-tests/perf_ats.c +++ b/src/ats-tests/perf_ats.c | |||
@@ -420,7 +420,7 @@ main (int argc, char *argv[]) | |||
420 | /* Determine solver name */ | 420 | /* Determine solver name */ |
421 | solver = GNUNET_strdup (tmp); | 421 | solver = GNUNET_strdup (tmp); |
422 | /* Remove .exe prefix */ | 422 | /* Remove .exe prefix */ |
423 | if ((NULL != (dotexe = strstr (solver, ".exe")))&&(dotexe[4] == '\0')) | 423 | if ((NULL != (dotexe = strstr (solver, ".exe"))) && (dotexe[4] == '\0')) |
424 | dotexe[0] = '\0'; | 424 | dotexe[0] = '\0'; |
425 | 425 | ||
426 | /* Determine first '_' after solver */ | 426 | /* Determine first '_' after solver */ |
@@ -597,4 +597,5 @@ main (int argc, char *argv[]) | |||
597 | return result; | 597 | return result; |
598 | } | 598 | } |
599 | 599 | ||
600 | |||
600 | /* end of file perf_ats.c */ | 601 | /* end of file perf_ats.c */ |
diff --git a/src/ats-tests/perf_ats_logging.c b/src/ats-tests/perf_ats_logging.c index 41c50ea6e..ac8fa8950 100644 --- a/src/ats-tests/perf_ats_logging.c +++ b/src/ats-tests/perf_ats_logging.c | |||
@@ -372,6 +372,7 @@ write_rtt_gnuplot_script (char *fn, struct LoggingPeer *lp) | |||
372 | GNUNET_free (gfn); | 372 | GNUNET_free (gfn); |
373 | } | 373 | } |
374 | 374 | ||
375 | |||
375 | static void | 376 | static void |
376 | write_bw_gnuplot_script (char *fn, struct LoggingPeer *lp) | 377 | write_bw_gnuplot_script (char *fn, struct LoggingPeer *lp) |
377 | { | 378 | { |
@@ -514,7 +515,6 @@ write_to_file () | |||
514 | /* Assembling master string */ | 515 | /* Assembling master string */ |
515 | 516 | ||
516 | 517 | ||
517 | |||
518 | GNUNET_asprintf (&data, "%llu;%llu;%u;%u;%u;%u;%u;%u;;;;;;;;;;;%s\n", | 518 | GNUNET_asprintf (&data, "%llu;%llu;%u;%u;%u;%u;%u;%u;;;;;;;;;;;%s\n", |
519 | cur_lt->timestamp, | 519 | cur_lt->timestamp, |
520 | GNUNET_TIME_absolute_get_difference (lp[c_m].start, | 520 | GNUNET_TIME_absolute_get_difference (lp[c_m].start, |
@@ -703,6 +703,7 @@ collect_log_now (void) | |||
703 | } | 703 | } |
704 | } | 704 | } |
705 | 705 | ||
706 | |||
706 | static void | 707 | static void |
707 | collect_log_task (void *cls) | 708 | collect_log_task (void *cls) |
708 | { | 709 | { |
@@ -774,4 +775,6 @@ perf_logging_start (struct GNUNET_TIME_Relative log_frequency, | |||
774 | log_task = GNUNET_SCHEDULER_add_now (&collect_log_task, NULL); | 775 | log_task = GNUNET_SCHEDULER_add_now (&collect_log_task, NULL); |
775 | running = GNUNET_YES; | 776 | running = GNUNET_YES; |
776 | } | 777 | } |
778 | |||
779 | |||
777 | /* end of file perf_ats_logging.c */ | 780 | /* end of file perf_ats_logging.c */ |