aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rps/gnunet-service-rps.c2
-rw-r--r--src/rps/gnunet-service-rps_sampler.c11
-rw-r--r--src/rps/rps.h7
3 files changed, 17 insertions, 3 deletions
diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c
index 37b6a6fab..0b3befdcf 100644
--- a/src/rps/gnunet-service-rps.c
+++ b/src/rps/gnunet-service-rps.c
@@ -61,7 +61,7 @@ static const struct GNUNET_CONFIGURATION_Handle *cfg;
61/** 61/**
62 * Handle to the statistics service. 62 * Handle to the statistics service.
63 */ 63 */
64static struct GNUNET_STATISTICS_Handle *stats; 64struct GNUNET_STATISTICS_Handle *stats;
65 65
66/** 66/**
67 * Our own identity. 67 * Our own identity.
diff --git a/src/rps/gnunet-service-rps_sampler.c b/src/rps/gnunet-service-rps_sampler.c
index 20b2d3420..e07fe1f3c 100644
--- a/src/rps/gnunet-service-rps_sampler.c
+++ b/src/rps/gnunet-service-rps_sampler.c
@@ -23,6 +23,7 @@
23 */ 23 */
24#include "platform.h" 24#include "platform.h"
25#include "gnunet_util_lib.h" 25#include "gnunet_util_lib.h"
26#include "gnunet_statistics_service.h"
26#include "rps.h" 27#include "rps.h"
27 28
28#include "gnunet-service-rps_sampler.h" 29#include "gnunet-service-rps_sampler.h"
@@ -636,7 +637,15 @@ sampler_mod_get_rand_peer (void *cls)
636 // TODO add other reasons to wait here 637 // TODO add other reasons to wait here
637 } 638 }
638 639
639 s_elem->last_client_request = GNUNET_TIME_absolute_get (); 640 GNUNET_STATISTICS_set (stats,
641 "# client sampler element input",
642 s_elem->num_peers,
643 GNUNET_NO);
644 GNUNET_STATISTICS_set (stats,
645 "# client sampler element change",
646 s_elem->num_change,
647 GNUNET_NO);
648
640 RPS_sampler_elem_reinit (s_elem); 649 RPS_sampler_elem_reinit (s_elem);
641 650
642 GNUNET_CONTAINER_DLL_remove (gpc->req_handle->gpc_head, 651 GNUNET_CONTAINER_DLL_remove (gpc->req_handle->gpc_head,
diff --git a/src/rps/rps.h b/src/rps/rps.h
index 6bf2273b4..58ba79082 100644
--- a/src/rps/rps.h
+++ b/src/rps/rps.h
@@ -216,6 +216,7 @@ struct GNUNET_RPS_CS_DEBUG_ViewReply
216}; 216};
217 /* Followed by num_peers * GNUNET_PeerIdentity */ 217 /* Followed by num_peers * GNUNET_PeerIdentity */
218 218
219GNUNET_NETWORK_STRUCT_END
219 220
220/*********************************************************************** 221/***********************************************************************
221 * Defines from old gnunet-service-rps_peers.h 222 * Defines from old gnunet-service-rps_peers.h
@@ -312,4 +313,8 @@ typedef int
312 const struct GNUNET_PeerIdentity *peer); 313 const struct GNUNET_PeerIdentity *peer);
313 314
314 315
315GNUNET_NETWORK_STRUCT_END 316/**
317 * Handle to the statistics service.
318 */
319extern struct GNUNET_STATISTICS_Handle *stats;
320