[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r30492 - gnunet/src/ats
From: |
gnunet |
Subject: |
[GNUnet-SVN] r30492 - gnunet/src/ats |
Date: |
Thu, 31 Oct 2013 15:24:11 +0100 |
Author: wachs
Date: 2013-10-31 15:24:10 +0100 (Thu, 31 Oct 2013)
New Revision: 30492
Modified:
gnunet/src/ats/libgnunet_plugin_ats_mlp.c
gnunet/src/ats/perf_ats_solver.c
Log:
update info for benchmark
Modified: gnunet/src/ats/libgnunet_plugin_ats_mlp.c
===================================================================
--- gnunet/src/ats/libgnunet_plugin_ats_mlp.c 2013-10-31 14:10:37 UTC (rev
30491)
+++ gnunet/src/ats/libgnunet_plugin_ats_mlp.c 2013-10-31 14:24:10 UTC (rev
30492)
@@ -1105,7 +1105,8 @@
mlp->bulk_request ++;
return GNUNET_NO;
}
- notify (mlp, GAS_OP_SOLVE_START, GAS_STAT_SUCCESS, GAS_INFO_NONE);
+ notify (mlp, GAS_OP_SOLVE_START, GAS_STAT_SUCCESS,
+ (GNUNET_YES == mlp->mlp_prob_changed) ? GAS_INFO_MLP_FULL :
GAS_INFO_MLP_UPDATED);
if (0 == GNUNET_CONTAINER_multipeermap_size (mlp->requested_peers))
{
Modified: gnunet/src/ats/perf_ats_solver.c
===================================================================
--- gnunet/src/ats/perf_ats_solver.c 2013-10-31 14:10:37 UTC (rev 30491)
+++ gnunet/src/ats/perf_ats_solver.c 2013-10-31 14:24:10 UTC (rev 30492)
@@ -156,6 +156,8 @@
int peers;
int addresses;
+ enum GAS_Solver_Additional_Information info;
+
struct GNUNET_TIME_Relative d_setup;
struct GNUNET_TIME_Relative d_lp;
struct GNUNET_TIME_Relative d_mlp;
@@ -380,20 +382,41 @@
enum GAS_Solver_Status stat,
enum GAS_Solver_Additional_Information add)
{
+ char *add_info;
+ switch (add) {
+ case GAS_INFO_NONE:
+ add_info = "GAS_INFO_NONE";
+ break;
+ case GAS_INFO_MLP_FULL:
+ add_info = "GAS_INFO_MLP_FULL";
+ break;
+ case GAS_INFO_MLP_UPDATED:
+ add_info = "GAS_INFO_MLP_UPDATED";
+ break;
+ case GAS_INFO_PROP_ALL:
+ add_info = "GAS_INFO_PROP_ALL";
+ break;
+ case GAS_INFO_PROP_SINGLE:
+ add_info = "GAS_INFO_PROP_SINGLE";
+ break;
+ default:
+ break;
+ }
struct Result *tmp;
switch (op)
{
case GAS_OP_SOLVE_START:
GNUNET_log(GNUNET_ERROR_TYPE_INFO,
- "Solver notifies `%s' with result `%s'\n", "GAS_OP_SOLVE_START",
- (GAS_STAT_SUCCESS == stat) ? "SUCCESS" : "FAIL");
+ "Solver notifies `%s' with result `%s' `%s'\n", "GAS_OP_SOLVE_START",
+ (GAS_STAT_SUCCESS == stat) ? "SUCCESS" : "FAIL", add_info);
if (GNUNET_NO == ph.expecting_solution)
{
/* We do not expect a solution at the moment */
GNUNET_break (0);
return;
}
+
if ((GAS_STAT_SUCCESS == stat) && (NULL == ph.current_result))
{
/* Create new result */
@@ -402,17 +425,18 @@
GNUNET_CONTAINER_DLL_insert_tail(ph.head, ph.tail, tmp);
ph.current_result->addresses = ph.current_a;
ph.current_result->peers = ph.current_p;
- ph.current_result->s_total = GNUNET_TIME_absolute_get ();
- ph.current_result->d_total = GNUNET_TIME_relative_get_forever_ ();
- ph.current_result->d_setup = GNUNET_TIME_relative_get_forever_ ();
- ph.current_result->d_lp = GNUNET_TIME_relative_get_forever_ ();
- ph.current_result->d_mlp = GNUNET_TIME_relative_get_forever_ ();
+ ph.current_result->s_total = GNUNET_TIME_absolute_get();
+ ph.current_result->d_total = GNUNET_TIME_UNIT_FOREVER_REL;
+ ph.current_result->d_setup = GNUNET_TIME_UNIT_FOREVER_REL;
+ ph.current_result->d_lp = GNUNET_TIME_UNIT_FOREVER_REL;
+ ph.current_result->d_mlp = GNUNET_TIME_UNIT_FOREVER_REL;
+ ph.current_result->info = add;
}
return;
case GAS_OP_SOLVE_STOP:
GNUNET_log(GNUNET_ERROR_TYPE_INFO,
"Solver notifies `%s' with result `%s'\n", "GAS_OP_SOLVE_STOP",
- (GAS_STAT_SUCCESS == stat) ? "SUCCESS" : "FAIL");
+ (GAS_STAT_SUCCESS == stat) ? "SUCCESS" : "FAIL", add_info);
if ((GNUNET_NO == ph.expecting_solution) || (NULL == ph.current_result))
{
/* We do not expect a solution at the moment */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r30492 - gnunet/src/ats,
gnunet <=