diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2012-04-17 14:49:06 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2012-04-17 14:49:06 +0000 |
commit | 3b7f99a75ad2d38659a5ae30911df4cacda5ba96 (patch) | |
tree | 63cda418bb55a68b443534f058b639859555b03d /src/ats | |
parent | 2d3d06c3d996d731ce8142c7f725a98e67facc0d (diff) | |
download | gnunet-3b7f99a75ad2d38659a5ae30911df4cacda5ba96.tar.gz gnunet-3b7f99a75ad2d38659a5ae30911df4cacda5ba96.zip |
- latest changes
Diffstat (limited to 'src/ats')
-rw-r--r-- | src/ats/perf_ats_mlp.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/ats/perf_ats_mlp.c b/src/ats/perf_ats_mlp.c index a025a0a91..bf2de8719 100644 --- a/src/ats/perf_ats_mlp.c +++ b/src/ats/perf_ats_mlp.c | |||
@@ -111,11 +111,19 @@ int stat_it (void *cls, const char *subsystem, | |||
111 | int is_persistent) | 111 | int is_persistent) |
112 | { | 112 | { |
113 | static int calls; | 113 | static int calls; |
114 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%s : %llu\n", name, value); | 114 | static long long unsigned lp_time; |
115 | static long long unsigned mlp_time; | ||
116 | |||
117 | if (0 == strcmp (name, "# LP execution time (ms)")) | ||
118 | lp_time = value; | ||
119 | if (0 == strcmp (name, "# MLP execution time (ms)")) | ||
120 | mlp_time = value; | ||
121 | |||
115 | calls ++; | 122 | calls ++; |
116 | 123 | ||
117 | if (2 == calls) | 124 | if (2 == calls) |
118 | { | 125 | { |
126 | printf ("%u;%u;%llu;%llu\n",peers, addresses, lp_time, mlp_time); | ||
119 | if (GNUNET_SCHEDULER_NO_TASK != shutdown_task) | 127 | if (GNUNET_SCHEDULER_NO_TASK != shutdown_task) |
120 | GNUNET_SCHEDULER_cancel(shutdown_task); | 128 | GNUNET_SCHEDULER_cancel(shutdown_task); |
121 | shutdown_task = GNUNET_SCHEDULER_add_now(&do_shutdown, NULL); | 129 | shutdown_task = GNUNET_SCHEDULER_add_now(&do_shutdown, NULL); |
@@ -194,7 +202,7 @@ check (void *cls, char *const *args, const char *cfgfile, | |||
194 | ca++; | 202 | ca++; |
195 | } | 203 | } |
196 | } | 204 | } |
197 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Problem contains %u peers and %u adresses\n", mlp->c_p, mlp->addr_in_problem); | 205 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Problem contains %u peers and %u adresses\n", mlp->c_p, mlp->addr_in_problem); |
198 | 206 | ||
199 | GNUNET_assert (peers == mlp->c_p); | 207 | GNUNET_assert (peers == mlp->c_p); |
200 | GNUNET_assert (peers * addresses == mlp->addr_in_problem); | 208 | GNUNET_assert (peers * addresses == mlp->addr_in_problem); |
@@ -203,9 +211,7 @@ check (void *cls, char *const *args, const char *cfgfile, | |||
203 | if (GNUNET_OK == GAS_mlp_solve_problem(mlp)) | 211 | if (GNUNET_OK == GAS_mlp_solve_problem(mlp)) |
204 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Problem solved successfully \n"); | 212 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Problem solved successfully \n"); |
205 | else | 213 | else |
206 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Problem solved failed \n"); | 214 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Solving problem with %u peers and %u addresses failed\n", peers, addresses); |
207 | |||
208 | |||
209 | 215 | ||
210 | GAS_mlp_done (mlp); | 216 | GAS_mlp_done (mlp); |
211 | 217 | ||