aboutsummaryrefslogtreecommitdiff
path: root/src/ats-tests
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2015-04-09 11:01:28 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2015-04-09 11:01:28 +0000
commit5ffbe65c5c78e09b83d3eaae95c2c363535a332f (patch)
tree58ea8c81da45112b0439ba67393378731a64392d /src/ats-tests
parenta541dc562dcd9508acdd0102d3aee3c857463bed (diff)
downloadgnunet-5ffbe65c5c78e09b83d3eaae95c2c363535a332f.tar.gz
gnunet-5ffbe65c5c78e09b83d3eaae95c2c363535a332f.zip
adding new ATS struct, updating config files to use lower case solver names
Diffstat (limited to 'src/ats-tests')
-rw-r--r--src/ats-tests/gnunet_ats_sim_default.conf2
-rw-r--r--src/ats-tests/perf_ats.c29
-rw-r--r--src/ats-tests/perf_ats_mlp_bandwidth.conf2
-rw-r--r--src/ats-tests/perf_ats_mlp_latency.conf2
-rw-r--r--src/ats-tests/perf_ats_mlp_none.conf2
-rw-r--r--src/ats-tests/perf_ats_proportional_bandwidth.conf2
-rw-r--r--src/ats-tests/perf_ats_proportional_latency.conf2
-rw-r--r--src/ats-tests/perf_ats_proportional_none.conf2
-rw-r--r--src/ats-tests/perf_ats_ril_bandwidth.conf2
-rw-r--r--src/ats-tests/perf_ats_ril_latency.conf2
-rw-r--r--src/ats-tests/perf_ats_ril_none.conf2
11 files changed, 27 insertions, 22 deletions
diff --git a/src/ats-tests/gnunet_ats_sim_default.conf b/src/ats-tests/gnunet_ats_sim_default.conf
index ca95eb923..a838306c3 100644
--- a/src/ats-tests/gnunet_ats_sim_default.conf
+++ b/src/ats-tests/gnunet_ats_sim_default.conf
@@ -3,4 +3,4 @@
3plugins = unix 3plugins = unix
4 4
5[ats] 5[ats]
6MODE = PROPORTIONAL 6MODE = proportional
diff --git a/src/ats-tests/perf_ats.c b/src/ats-tests/perf_ats.c
index f278bfbb5..5db2f3b24 100644
--- a/src/ats-tests/perf_ats.c
+++ b/src/ats-tests/perf_ats.c
@@ -320,11 +320,10 @@ static void
320log_request_cb (void *cls, const struct GNUNET_HELLO_Address *address, 320log_request_cb (void *cls, const struct GNUNET_HELLO_Address *address,
321 int address_active, struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, 321 int address_active, struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out,
322 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, 322 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in,
323 const struct GNUNET_ATS_Information *ats, uint32_t ats_count) 323 const struct GNUNET_ATS_Properties *ats)
324{ 324{
325 struct BenchmarkPeer *me = cls; 325 struct BenchmarkPeer *me = cls;
326 struct BenchmarkPartner *p; 326 struct BenchmarkPartner *p;
327 int c_a;
328 char *peer_id; 327 char *peer_id;
329 328
330 p = find_partner (me, &address->peer); 329 p = find_partner (me, &address->peer);
@@ -342,15 +341,11 @@ log_request_cb (void *cls, const struct GNUNET_HELLO_Address *address,
342 p->bandwidth_in = ntohl (bandwidth_in.value__); 341 p->bandwidth_in = ntohl (bandwidth_in.value__);
343 p->bandwidth_out = ntohl (bandwidth_out.value__); 342 p->bandwidth_out = ntohl (bandwidth_out.value__);
344 343
345 for (c_a = 0; c_a < ats_count; c_a++) 344 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "%s [%u] received ATS information for peers `%s'\n",
346 { 345 (GNUNET_YES == p->me->master) ? "Master" : "Slave",
347 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "%s [%u] received ATS information: %s %s %u\n", 346 p->me->no,
348 (GNUNET_YES == p->me->master) ? "Master" : "Slave", 347 GNUNET_i2s (&p->dest->id));
349 p->me->no, 348
350 GNUNET_i2s (&p->dest->id),
351 GNUNET_ATS_print_property_type(ntohl(ats[c_a].type)),
352 ntohl(ats[c_a].value));
353 }
354 GNUNET_free(peer_id); 349 GNUNET_free(peer_id);
355 if (NULL != l) 350 if (NULL != l)
356 GNUNET_ATS_TEST_logging_now (l); 351 GNUNET_ATS_TEST_logging_now (l);
@@ -374,17 +369,27 @@ main (int argc, char *argv[])
374 369
375 result = 0; 370 result = 0;
376 371
377 /* figure out testname */ 372 /* Determine testname
373 * perf_ats_<solver>_<transport>_<preference>[.exe]*/
374
375 /* Find test prefix, store in temp */
378 tmp = strstr (argv[0], TESTNAME_PREFIX); 376 tmp = strstr (argv[0], TESTNAME_PREFIX);
379 if (NULL == tmp) 377 if (NULL == tmp)
380 { 378 {
381 fprintf (stderr, "Unable to parse test name `%s'\n", argv[0]); 379 fprintf (stderr, "Unable to parse test name `%s'\n", argv[0]);
382 return GNUNET_SYSERR; 380 return GNUNET_SYSERR;
383 } 381 }
382
383 /* Set tmp to end of test name prefix */
384 tmp += strlen (TESTNAME_PREFIX); 384 tmp += strlen (TESTNAME_PREFIX);
385
386 /* Determine solver name */
385 solver = GNUNET_strdup (tmp); 387 solver = GNUNET_strdup (tmp);
388 /* Remove .exe prefix */
386 if (NULL != (dotexe = strstr (solver, ".exe")) && dotexe[4] == '\0') 389 if (NULL != (dotexe = strstr (solver, ".exe")) && dotexe[4] == '\0')
387 dotexe[0] = '\0'; 390 dotexe[0] = '\0';
391
392 /* Determine first '_' after solver */
388 tmp_sep = strchr (solver, '_'); 393 tmp_sep = strchr (solver, '_');
389 if (NULL == tmp_sep) 394 if (NULL == tmp_sep)
390 { 395 {
diff --git a/src/ats-tests/perf_ats_mlp_bandwidth.conf b/src/ats-tests/perf_ats_mlp_bandwidth.conf
index 175521c87..b803d683d 100644
--- a/src/ats-tests/perf_ats_mlp_bandwidth.conf
+++ b/src/ats-tests/perf_ats_mlp_bandwidth.conf
@@ -1,4 +1,4 @@
1@INLINE@ template_perf_ats.conf 1@INLINE@ template_perf_ats.conf
2 2
3[ats] 3[ats]
4MODE = MLP \ No newline at end of file 4MODE = mlp
diff --git a/src/ats-tests/perf_ats_mlp_latency.conf b/src/ats-tests/perf_ats_mlp_latency.conf
index 7bdf20182..b803d683d 100644
--- a/src/ats-tests/perf_ats_mlp_latency.conf
+++ b/src/ats-tests/perf_ats_mlp_latency.conf
@@ -1,4 +1,4 @@
1@INLINE@ template_perf_ats.conf 1@INLINE@ template_perf_ats.conf
2 2
3[ats] 3[ats]
4MODE = MLP 4MODE = mlp
diff --git a/src/ats-tests/perf_ats_mlp_none.conf b/src/ats-tests/perf_ats_mlp_none.conf
index 175521c87..b803d683d 100644
--- a/src/ats-tests/perf_ats_mlp_none.conf
+++ b/src/ats-tests/perf_ats_mlp_none.conf
@@ -1,4 +1,4 @@
1@INLINE@ template_perf_ats.conf 1@INLINE@ template_perf_ats.conf
2 2
3[ats] 3[ats]
4MODE = MLP \ No newline at end of file 4MODE = mlp
diff --git a/src/ats-tests/perf_ats_proportional_bandwidth.conf b/src/ats-tests/perf_ats_proportional_bandwidth.conf
index dc2f47313..dba96c0fe 100644
--- a/src/ats-tests/perf_ats_proportional_bandwidth.conf
+++ b/src/ats-tests/perf_ats_proportional_bandwidth.conf
@@ -1,4 +1,4 @@
1@INLINE@ template_perf_ats.conf 1@INLINE@ template_perf_ats.conf
2 2
3[ats] 3[ats]
4MODE = PROPORTIONAL 4MODE = proportional
diff --git a/src/ats-tests/perf_ats_proportional_latency.conf b/src/ats-tests/perf_ats_proportional_latency.conf
index dc2f47313..dba96c0fe 100644
--- a/src/ats-tests/perf_ats_proportional_latency.conf
+++ b/src/ats-tests/perf_ats_proportional_latency.conf
@@ -1,4 +1,4 @@
1@INLINE@ template_perf_ats.conf 1@INLINE@ template_perf_ats.conf
2 2
3[ats] 3[ats]
4MODE = PROPORTIONAL 4MODE = proportional
diff --git a/src/ats-tests/perf_ats_proportional_none.conf b/src/ats-tests/perf_ats_proportional_none.conf
index dc2f47313..dba96c0fe 100644
--- a/src/ats-tests/perf_ats_proportional_none.conf
+++ b/src/ats-tests/perf_ats_proportional_none.conf
@@ -1,4 +1,4 @@
1@INLINE@ template_perf_ats.conf 1@INLINE@ template_perf_ats.conf
2 2
3[ats] 3[ats]
4MODE = PROPORTIONAL 4MODE = proportional
diff --git a/src/ats-tests/perf_ats_ril_bandwidth.conf b/src/ats-tests/perf_ats_ril_bandwidth.conf
index 14eb9f68d..3e7969a84 100644
--- a/src/ats-tests/perf_ats_ril_bandwidth.conf
+++ b/src/ats-tests/perf_ats_ril_bandwidth.conf
@@ -1,4 +1,4 @@
1@INLINE@ template_perf_ats.conf 1@INLINE@ template_perf_ats.conf
2 2
3[ats] 3[ats]
4MODE = RIL \ No newline at end of file 4MODE = ril
diff --git a/src/ats-tests/perf_ats_ril_latency.conf b/src/ats-tests/perf_ats_ril_latency.conf
index 40336a90d..3e7969a84 100644
--- a/src/ats-tests/perf_ats_ril_latency.conf
+++ b/src/ats-tests/perf_ats_ril_latency.conf
@@ -1,4 +1,4 @@
1@INLINE@ template_perf_ats.conf 1@INLINE@ template_perf_ats.conf
2 2
3[ats] 3[ats]
4MODE = RIL 4MODE = ril
diff --git a/src/ats-tests/perf_ats_ril_none.conf b/src/ats-tests/perf_ats_ril_none.conf
index 14eb9f68d..3e7969a84 100644
--- a/src/ats-tests/perf_ats_ril_none.conf
+++ b/src/ats-tests/perf_ats_ril_none.conf
@@ -1,4 +1,4 @@
1@INLINE@ template_perf_ats.conf 1@INLINE@ template_perf_ats.conf
2 2
3[ats] 3[ats]
4MODE = RIL \ No newline at end of file 4MODE = ril