diff options
author | Nathan S. Evans <evans@in.tum.de> | 2011-04-08 15:48:44 +0000 |
---|---|---|
committer | Nathan S. Evans <evans@in.tum.de> | 2011-04-08 15:48:44 +0000 |
commit | 726f073f6c0fd2f5901a316ec747ee53b1655119 (patch) | |
tree | 139c67e45af91b5b0d98d8a0cd396601d14c0c7c /src/dht | |
parent | 151f25fc399c71f857e1debf7d5bcd40f99ff80f (diff) | |
download | gnunet-726f073f6c0fd2f5901a316ec747ee53b1655119.tar.gz gnunet-726f073f6c0fd2f5901a316ec747ee53b1655119.zip |
record peer start duration
Diffstat (limited to 'src/dht')
-rw-r--r-- | src/dht/gnunet-dht-driver.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/dht/gnunet-dht-driver.c b/src/dht/gnunet-dht-driver.c index 2892e37eb..602f246c4 100644 --- a/src/dht/gnunet-dht-driver.c +++ b/src/dht/gnunet-dht-driver.c | |||
@@ -3170,6 +3170,7 @@ peers_started_callback(void *cls, const struct GNUNET_PeerIdentity *id, | |||
3170 | const struct GNUNET_CONFIGURATION_Handle *cfg, | 3170 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
3171 | struct GNUNET_TESTING_Daemon *d, const char *emsg) | 3171 | struct GNUNET_TESTING_Daemon *d, const char *emsg) |
3172 | { | 3172 | { |
3173 | char *revision_str; | ||
3173 | if (emsg != NULL) | 3174 | if (emsg != NULL) |
3174 | { | 3175 | { |
3175 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 3176 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -3194,6 +3195,14 @@ peers_started_callback(void *cls, const struct GNUNET_PeerIdentity *id, | |||
3194 | #endif | 3195 | #endif |
3195 | GNUNET_SCHEDULER_cancel (die_task); | 3196 | GNUNET_SCHEDULER_cancel (die_task); |
3196 | 3197 | ||
3198 | GNUNET_asprintf (&revision_str, "%llu", revision); | ||
3199 | if (GNUNET_YES == insert_gauger_data) | ||
3200 | GAUGER_ID("DHT_TESTING", | ||
3201 | "peer_startup_time", | ||
3202 | GNUNET_TIME_absolute_get_duration(peer_start_time).rel_value / (double)num_peers, | ||
3203 | "ms/peer", revision_str); | ||
3204 | GNUNET_free(revision_str); | ||
3205 | |||
3197 | expected_connections = UINT_MAX; | 3206 | expected_connections = UINT_MAX; |
3198 | if ((pg != NULL) && (peers_left == 0)) | 3207 | if ((pg != NULL) && (peers_left == 0)) |
3199 | { | 3208 | { |