*/
#define COVER_AGE_FREQUENCY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5)
+/**
+ * Collect an instane number of statistics? May cause excessive IPC.
+ */
+#define INSANE_STATISTICS GNUNET_NO
+
/* ****************************** globals ****************************** */
if (GNUNET_YES != GSF_pending_request_test_target_ (pr, peer))
{
+#if INSANE_STATISTICS
GNUNET_STATISTICS_update (GSF_stats,
gettext_noop ("# Loopback routes suppressed"), 1,
GNUNET_NO);
+#endif
return;
}
GSF_plan_add_ (cp, pr);
*/
#define REPLY_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 2)
+/**
+ * Collect an instane number of statistics? May cause excessive IPC.
+ */
+#define INSANE_STATISTICS GNUNET_NO
+
/**
* Handle to cancel a transmission request.
GNUNET_CRYPTO_random_u32
(GNUNET_CRYPTO_QUALITY_WEAK,
2 * GSF_avg_latency.rel_value + 1));
+#if INSANE_STATISTICS
GNUNET_STATISTICS_update (GSF_stats,
gettext_noop
("# artificial delays introduced (ms)"),
ret.rel_value, GNUNET_NO);
-
+#endif
return ret;
}
ld = GSF_test_get_load_too_high_ (0);
if (GNUNET_SYSERR == ld)
{
+#if INSANE_STATISTICS
GNUNET_STATISTICS_update (GSF_stats,
gettext_noop
("# requests done for free (low load)"), 1,
GNUNET_NO);
+#endif
return 0; /* excess resources */
}
if (prio_in > INT32_MAX)
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Failed to find peer `%4s' in connection set. Dropping query.\n",
GNUNET_i2s (other));
+#if INSANE_STATISTICS
GNUNET_STATISTICS_update (GSF_stats,
gettext_noop
("# requests dropped due to missing reverse route"),
1, GNUNET_NO);
+#endif
return NULL;
}
/* note that we can really only check load here since otherwise
GNUNET_SCHEDULER_add_delayed (delay, &schedule_peer_transmission, pp);
return;
}
+#if INSANE_STATISTICS
GNUNET_STATISTICS_update (GSF_stats, gettext_noop ("# query plans executed"),
1, GNUNET_NO);
+#endif
/* process from priority heap */
rp = GNUNET_CONTAINER_heap_peek (pp->priority_heap);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Executing query plan %p\n", rp);
last_transmission, prq->type, prq->data, prq->size);
return GNUNET_YES;
case GNUNET_BLOCK_EVALUATION_OK_DUPLICATE:
+#if INSANE_STATISTICS
GNUNET_STATISTICS_update (GSF_stats,
gettext_noop
("# duplicate replies discarded (bloomfilter)"),
1, GNUNET_NO);
+#endif
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Duplicate response, discarding.\n");
return GNUNET_YES; /* duplicate */
* Statistics we print out.
*/
static struct StatValues stats[] = {
- {"fs", "# artificial delays introduced (ms)"},
{"fs", "# queries forwarded"},
{"fs", "# replies received and matched"},
{"fs", "# results found locally"},