aboutsummaryrefslogtreecommitdiff
path: root/src/datastore/perf_plugin_datastore.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/datastore/perf_plugin_datastore.c')
-rw-r--r--src/datastore/perf_plugin_datastore.c45
1 files changed, 27 insertions, 18 deletions
diff --git a/src/datastore/perf_plugin_datastore.c b/src/datastore/perf_plugin_datastore.c
index 0aeb426ab..cbc01844e 100644
--- a/src/datastore/perf_plugin_datastore.c
+++ b/src/datastore/perf_plugin_datastore.c
@@ -133,6 +133,7 @@ put_continuation (void *cls,
133 GNUNET_SCHEDULER_add_now (&test, crc); 133 GNUNET_SCHEDULER_add_now (&test, crc);
134} 134}
135 135
136
136static void 137static void
137do_put (struct CpsRunContext *crc) 138do_put (struct CpsRunContext *crc)
138{ 139{
@@ -195,9 +196,14 @@ do_put (struct CpsRunContext *crc)
195 196
196 197
197static int 198static int
198iterate_zeros (void *cls, const struct GNUNET_HashCode * key, uint32_t size, 199iterate_zeros (void *cls,
199 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority, 200 const struct GNUNET_HashCode *key,
200 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration, 201 uint32_t size,
202 const void *data,
203 enum GNUNET_BLOCK_Type type,
204 uint32_t priority,
205 uint32_t anonymity,
206 struct GNUNET_TIME_Absolute expiration,
201 uint64_t uid) 207 uint64_t uid)
202{ 208{
203 struct CpsRunContext *crc = cls; 209 struct CpsRunContext *crc = cls;
@@ -246,10 +252,15 @@ iterate_zeros (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
246 252
247 253
248static int 254static int
249expiration_get (void *cls, const struct GNUNET_HashCode * key, uint32_t size, 255expiration_get (void *cls,
250 const void *data, enum GNUNET_BLOCK_Type type, 256 const struct GNUNET_HashCode *key,
251 uint32_t priority, uint32_t anonymity, 257 uint32_t size,
252 struct GNUNET_TIME_Absolute expiration, uint64_t uid) 258 const void *data,
259 enum GNUNET_BLOCK_Type type,
260 uint32_t priority,
261 uint32_t anonymity,
262 struct GNUNET_TIME_Absolute expiration,
263 uint64_t uid)
253{ 264{
254 struct CpsRunContext *crc = cls; 265 struct CpsRunContext *crc = cls;
255 int i; 266 int i;
@@ -293,10 +304,15 @@ expiration_get (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
293 304
294 305
295static int 306static int
296replication_get (void *cls, const struct GNUNET_HashCode * key, uint32_t size, 307replication_get (void *cls,
297 const void *data, enum GNUNET_BLOCK_Type type, 308 const struct GNUNET_HashCode *key,
298 uint32_t priority, uint32_t anonymity, 309 uint32_t size,
299 struct GNUNET_TIME_Absolute expiration, uint64_t uid) 310 const void *data,
311 enum GNUNET_BLOCK_Type type,
312 uint32_t priority,
313 uint32_t anonymity,
314 struct GNUNET_TIME_Absolute expiration,
315 uint64_t uid)
300{ 316{
301 struct CpsRunContext *crc = cls; 317 struct CpsRunContext *crc = cls;
302 int i; 318 int i;
@@ -388,14 +404,7 @@ static void
388test (void *cls) 404test (void *cls)
389{ 405{
390 struct CpsRunContext *crc = cls; 406 struct CpsRunContext *crc = cls;
391 const struct GNUNET_SCHEDULER_TaskContext *tc;
392 407
393 tc = GNUNET_SCHEDULER_get_task_context ();
394 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
395 {
396 GNUNET_break (0);
397 crc->phase = RP_ERROR;
398 }
399 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 408 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
400 "In phase %d, iteration %u\n", crc->phase, crc->cnt); 409 "In phase %d, iteration %u\n", crc->phase, crc->cnt);
401 switch (crc->phase) 410 switch (crc->phase)