summaryrefslogtreecommitdiff
path: root/src/ats-tests/gnunet-ats-sim.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2014-02-03 21:51:43 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2014-02-03 21:51:43 +0000
commit82668db981251a3b96760c289b459cad1bcece13 (patch)
tree9c8893c0bf2a10b552ccc723cb61a490a881c0f1 /src/ats-tests/gnunet-ats-sim.c
parent8a3563b5c242b60aa4b7d2b9a3c3607ef8dcbadb (diff)
downloadgnunet-82668db981251a3b96760c289b459cad1bcece13.tar.gz
gnunet-82668db981251a3b96760c289b459cad1bcece13.zip
adding preference generation
Diffstat (limited to 'src/ats-tests/gnunet-ats-sim.c')
-rw-r--r--src/ats-tests/gnunet-ats-sim.c37
1 files changed, 35 insertions, 2 deletions
diff --git a/src/ats-tests/gnunet-ats-sim.c b/src/ats-tests/gnunet-ats-sim.c
index e891cb39b..567fd7e50 100644
--- a/src/ats-tests/gnunet-ats-sim.c
+++ b/src/ats-tests/gnunet-ats-sim.c
@@ -136,13 +136,18 @@ do_shutdown ()
136 GNUNET_ATS_TEST_logging_clean_up (l); 136 GNUNET_ATS_TEST_logging_clean_up (l);
137 l = NULL; 137 l = NULL;
138 } 138 }
139
140 /* Stop traffic generation */
141 GNUNET_ATS_TEST_generate_traffic_stop_all();
142
143 /* Stop all preference generations */
144 GNUNET_ATS_TEST_generate_preferences_stop_all ();
145
139 if (NULL != e) 146 if (NULL != e)
140 { 147 {
141 GNUNET_break (0);
142 GNUNET_ATS_TEST_experimentation_stop (e); 148 GNUNET_ATS_TEST_experimentation_stop (e);
143 e = NULL; 149 e = NULL;
144 } 150 }
145 GNUNET_break (0);
146 GNUNET_ATS_TEST_shutdown_topology (); 151 GNUNET_ATS_TEST_shutdown_topology ();
147} 152}
148 153
@@ -189,6 +194,9 @@ experiment_done_cb (struct Experiment *e, struct GNUNET_TIME_Relative duration,i
189 /* Stop traffic generation */ 194 /* Stop traffic generation */
190 GNUNET_ATS_TEST_generate_traffic_stop_all(); 195 GNUNET_ATS_TEST_generate_traffic_stop_all();
191 196
197 /* Stop all preference generations */
198 GNUNET_ATS_TEST_generate_preferences_stop_all ();
199
192 evaluate (duration); 200 evaluate (duration);
193 if (opt_log) 201 if (opt_log)
194 GNUNET_ATS_TEST_logging_write_to_file(l, opt_exp_file, opt_plot); 202 GNUNET_ATS_TEST_logging_write_to_file(l, opt_exp_file, opt_plot);
@@ -229,6 +237,31 @@ static void topology_setup_done (void *cls,
229 e->num_masters, e->num_slaves, 237 e->num_masters, e->num_slaves,
230 opt_verbose); 238 opt_verbose);
231 GNUNET_ATS_TEST_experimentation_run (e, &episode_done_cb, &experiment_done_cb); 239 GNUNET_ATS_TEST_experimentation_run (e, &episode_done_cb, &experiment_done_cb);
240/*
241 GNUNET_ATS_TEST_generate_preferences_start(&masters[0],&masters[0].partners[0],
242 GNUNET_ATS_TEST_TG_CONSTANT, 1, 1, GNUNET_TIME_UNIT_SECONDS,
243 GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_MILLISECONDS, 250),
244 GNUNET_ATS_PREFERENCE_BANDWIDTH);
245*/
246/*
247 GNUNET_ATS_TEST_generate_preferences_start(&masters[0],&masters[0].partners[0],
248 GNUNET_ATS_TEST_TG_LINEAR, 1, 50,
249 GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 2),
250 GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_MILLISECONDS, 250),
251 GNUNET_ATS_PREFERENCE_BANDWIDTH);
252*/
253/*
254 GNUNET_ATS_TEST_generate_preferences_start(&masters[0],&masters[0].partners[0],
255 GNUNET_ATS_TEST_TG_RANDOM, 1, 50,
256 GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 2),
257 GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_MILLISECONDS, 250),
258 GNUNET_ATS_PREFERENCE_BANDWIDTH);
259*/
260 GNUNET_ATS_TEST_generate_preferences_start(&masters[0],&masters[0].partners[0],
261 GNUNET_ATS_TEST_TG_SINUS, 10, 5,
262 GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 5),
263 GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_MILLISECONDS, 250),
264 GNUNET_ATS_PREFERENCE_BANDWIDTH);
232 265
233#if 0 266#if 0
234 int c_m; 267 int c_m;