aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_statistics_service.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_statistics_service.h')
-rw-r--r--src/include/gnunet_statistics_service.h35
1 files changed, 17 insertions, 18 deletions
diff --git a/src/include/gnunet_statistics_service.h b/src/include/gnunet_statistics_service.h
index 1807d3de0..90cc612df 100644
--- a/src/include/gnunet_statistics_service.h
+++ b/src/include/gnunet_statistics_service.h
@@ -61,10 +61,9 @@ struct GNUNET_STATISTICS_Handle;
61 * @param is_persistent GNUNET_YES if the value is persistent, GNUNET_NO if not 61 * @param is_persistent GNUNET_YES if the value is persistent, GNUNET_NO if not
62 * @return GNUNET_OK to continue, GNUNET_SYSERR to abort iteration 62 * @return GNUNET_OK to continue, GNUNET_SYSERR to abort iteration
63 */ 63 */
64typedef int (*GNUNET_STATISTICS_Iterator) (void *cls, 64typedef int (*GNUNET_STATISTICS_Iterator) (void *cls, const char *subsystem,
65 const char *subsystem, 65 const char *name, uint64_t value,
66 const char *name, 66 int is_persistent);
67 uint64_t value, int is_persistent);
68 67
69/** 68/**
70 * Get handle for the statistics service. 69 * Get handle for the statistics service.
@@ -73,9 +72,11 @@ typedef int (*GNUNET_STATISTICS_Iterator) (void *cls,
73 * @param cfg services configuration in use 72 * @param cfg services configuration in use
74 * @return handle to use 73 * @return handle to use
75 */ 74 */
76struct GNUNET_STATISTICS_Handle 75struct GNUNET_STATISTICS_Handle *GNUNET_STATISTICS_create (const char
77 *GNUNET_STATISTICS_create (const char *subsystem, 76 *subsystem,
78 const struct GNUNET_CONFIGURATION_Handle *cfg); 77 const struct
78 GNUNET_CONFIGURATION_Handle
79 *cfg);
79 80
80 81
81/** 82/**
@@ -102,11 +103,9 @@ void GNUNET_STATISTICS_destroy (struct GNUNET_STATISTICS_Handle *h,
102 * @param proc_cls closure for proc 103 * @param proc_cls closure for proc
103 * @return GNUNET_OK on success, GNUNET_SYSERR on error 104 * @return GNUNET_OK on success, GNUNET_SYSERR on error
104 */ 105 */
105int 106int GNUNET_STATISTICS_watch (struct GNUNET_STATISTICS_Handle *handle,
106GNUNET_STATISTICS_watch (struct GNUNET_STATISTICS_Handle *handle, 107 const char *subsystem, const char *name,
107 const char *subsystem, 108 GNUNET_STATISTICS_Iterator proc, void *proc_cls);
108 const char *name,
109 GNUNET_STATISTICS_Iterator proc, void *proc_cls);
110 109
111 110
112/** 111/**
@@ -169,9 +168,9 @@ void GNUNET_STATISTICS_get_cancel (struct GNUNET_STATISTICS_GetHandle *gh);
169 * @param value new value to set 168 * @param value new value to set
170 * @param make_persistent should the value be kept across restarts? 169 * @param make_persistent should the value be kept across restarts?
171 */ 170 */
172void 171void GNUNET_STATISTICS_set (struct GNUNET_STATISTICS_Handle *handle,
173GNUNET_STATISTICS_set (struct GNUNET_STATISTICS_Handle *handle, 172 const char *name, uint64_t value,
174 const char *name, uint64_t value, int make_persistent); 173 int make_persistent);
175 174
176/** 175/**
177 * Set statistic value for the peer. Will always use our 176 * Set statistic value for the peer. Will always use our
@@ -182,9 +181,9 @@ GNUNET_STATISTICS_set (struct GNUNET_STATISTICS_Handle *handle,
182 * @param delta change in value (added to existing value) 181 * @param delta change in value (added to existing value)
183 * @param make_persistent should the value be kept across restarts? 182 * @param make_persistent should the value be kept across restarts?
184 */ 183 */
185void 184void GNUNET_STATISTICS_update (struct GNUNET_STATISTICS_Handle *handle,
186GNUNET_STATISTICS_update (struct GNUNET_STATISTICS_Handle *handle, 185 const char *name, int64_t delta,
187 const char *name, int64_t delta, int make_persistent); 186 int make_persistent);
188 187
189 188
190 189