diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2014-01-30 10:45:13 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2014-01-30 10:45:13 +0000 |
commit | 7067d8df58abce4636ff94cd3621aee9de1ab594 (patch) | |
tree | 3632705ab7d0b30b791c240ef05eca74fa624597 /src/ats-tests/gnunet-ats-sim.c | |
parent | daf74c08914b5dbec07848207262eff933a5f180 (diff) | |
download | gnunet-7067d8df58abce4636ff94cd3621aee9de1ab594.tar.gz gnunet-7067d8df58abce4636ff94cd3621aee9de1ab594.zip |
writign plots
Diffstat (limited to 'src/ats-tests/gnunet-ats-sim.c')
-rw-r--r-- | src/ats-tests/gnunet-ats-sim.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/ats-tests/gnunet-ats-sim.c b/src/ats-tests/gnunet-ats-sim.c index 6a9797179..26d0d7d91 100644 --- a/src/ats-tests/gnunet-ats-sim.c +++ b/src/ats-tests/gnunet-ats-sim.c | |||
@@ -47,6 +47,11 @@ static char *opt_exp_file; | |||
47 | */ | 47 | */ |
48 | static int opt_log; | 48 | static int opt_log; |
49 | 49 | ||
50 | /** | ||
51 | * cmd option -p: enable plots | ||
52 | */ | ||
53 | static int opt_plot; | ||
54 | |||
50 | GNUNET_SCHEDULER_TaskIdentifier timeout_task; | 55 | GNUNET_SCHEDULER_TaskIdentifier timeout_task; |
51 | 56 | ||
52 | struct Experiment *e; | 57 | struct Experiment *e; |
@@ -162,7 +167,7 @@ experiment_done_cb (struct Experiment *e, struct GNUNET_TIME_Relative duration,i | |||
162 | GNUNET_ATS_TEST_logging_stop (l); | 167 | GNUNET_ATS_TEST_logging_stop (l); |
163 | evaluate (duration); | 168 | evaluate (duration); |
164 | if (opt_log) | 169 | if (opt_log) |
165 | GNUNET_ATS_TEST_logging_write_to_file(l, opt_exp_file); | 170 | GNUNET_ATS_TEST_logging_write_to_file(l, opt_exp_file, opt_plot); |
166 | 171 | ||
167 | /* Stop traffic generation */ | 172 | /* Stop traffic generation */ |
168 | GNUNET_ATS_TEST_generate_traffic_stop_all(); | 173 | GNUNET_ATS_TEST_generate_traffic_stop_all(); |
@@ -220,6 +225,7 @@ parse_args (int argc, char *argv[]) | |||
220 | int c; | 225 | int c; |
221 | opt_exp_file = NULL; | 226 | opt_exp_file = NULL; |
222 | opt_log = GNUNET_NO; | 227 | opt_log = GNUNET_NO; |
228 | opt_plot = GNUNET_NO; | ||
223 | 229 | ||
224 | for (c = 0; c < argc; c++) | 230 | for (c = 0; c < argc; c++) |
225 | { | 231 | { |
@@ -231,6 +237,10 @@ parse_args (int argc, char *argv[]) | |||
231 | { | 237 | { |
232 | opt_log = GNUNET_YES; | 238 | opt_log = GNUNET_YES; |
233 | } | 239 | } |
240 | if (0 == strcmp (argv[c], "-p")) | ||
241 | { | ||
242 | opt_plot = GNUNET_YES; | ||
243 | } | ||
234 | } | 244 | } |
235 | } | 245 | } |
236 | 246 | ||