em->header.type
= htons (GNUNET_MESSAGE_TYPE_NSE_ESTIMATE);
em->reserved = htonl (0);
+ em->timestamp = GNUNET_TIME_absolute_hton(GNUNET_TIME_absolute_get());
em->size_estimate = mean - 1.0/3.0;
em->std_deviation = std_dev;
GNUNET_STATISTICS_set (stats,
* Callback to call when network size estimate is updated.
*
* @param cls closure
+ * @param timestamp server timestamp
* @param estimate the value of the current network size estimate
* @param std_dev standard deviation (rounded down to nearest integer)
* of the size estimation values seen
*
*/
static void
-handle_estimate (void *cls, double estimate, double std_dev)
+handle_estimate (void *cls, struct GNUNET_TIME_AbsoluteNBO timestamp, double estimate, double std_dev)
{
struct NSEPeer *peer = cls;
char *output_buffer;
if (output_file != NULL)
{
size = GNUNET_asprintf(&output_buffer,
- "%s %u %f %f %f\n",
+ "%s %u %llu %f %f %f\n",
GNUNET_i2s(&peer->daemon->id),
peers_running,
+ GNUNET_TIME_absolute_ntoh(timestamp).abs_value,
pow(2, estimate),
estimate,
std_dev);
*/
uint32_t reserved;
+ /**
+ * Timestamp at which the server received the message.
+ */
+ struct GNUNET_TIME_AbsoluteNBO timestamp;
+
/**
* The current estimated network size.
*/
}
client_msg = (const struct GNUNET_NSE_ClientMessage *)msg;
h->recv_cb (h->recv_cb_cls,
+ client_msg->timestamp,
client_msg->size_estimate,
client_msg->std_deviation);
GNUNET_CLIENT_receive (h->client,