*/
static int do_warmup;
+/**
+ * Warmup progress.
+ */
+static unsigned int peers_warmup;
+
/**
* Flag to notify callbacks not to generate any new traffic anymore.
*/
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "WARMUP %u <= %u\n",
n, get_index (peer), channel);
+ peers_warmup++;
+ if (peers_warmup < peers_total)
+ return NULL;
+ test_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS,
+ &start_test, NULL);
return NULL;
}
GNUNET_assert (peer == peers[n].incoming);
const char *emsg)
{
long n = (long) cls;
- struct GNUNET_TIME_Relative delay;
if (NULL == pinfo || NULL != emsg)
{
return;
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Got all IDs, starting profiler\n");
if (do_warmup)
+ {
warmup();
- delay = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS,
- 150 * peers_total);
- test_task = GNUNET_SCHEDULER_add_delayed (delay, &start_test, NULL);
+ return; /* start_test from incoming_channel */
+ }
+ test_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS,
+ &start_test, NULL);
}
/**