crc->phase = RP_CUT;
}
GNUNET_SCHEDULER_add_continuation (crc->sched,
- GNUNET_NO,
&run_continuation,
crc,
GNUNET_SCHEDULER_REASON_PREREQ_DONE);
#endif
GNUNET_assert (GNUNET_OK == success);
GNUNET_SCHEDULER_add_continuation (crc->sched,
- GNUNET_NO,
&run_continuation,
crc,
GNUNET_SCHEDULER_REASON_PREREQ_DONE);
&crc->key,
crc->esize,
crc->data,
+ 1, 1, TIMEOUT,
&remove_next,
- crc,
- TIMEOUT);
+ crc);
}
const GNUNET_HashCode * key,
uint32_t size,
const void *data,
- uint32_t type,
+ enum GNUNET_BLOCK_Type type,
uint32_t priority,
uint32_t anonymity,
struct GNUNET_TIME_Absolute
{
crc->phase = RP_REPORT;
GNUNET_SCHEDULER_add_continuation (crc->sched,
- GNUNET_NO,
&run_continuation,
crc,
GNUNET_SCHEDULER_REASON_PREREQ_DONE);
return;
}
- GNUNET_SCHEDULER_add_after (crc->sched,
- GNUNET_NO,
- GNUNET_SCHEDULER_PRIORITY_HIGH,
- GNUNET_SCHEDULER_NO_TASK,
- &do_delete,
- crc);
+ GNUNET_SCHEDULER_add_with_priority (crc->sched,
+ GNUNET_SCHEDULER_PRIORITY_HIGH,
+ &do_delete,
+ crc);
return;
}
stored_ops++;
if (stored_bytes < MAX_SIZE)
- return;
+ {
+ GNUNET_DATASTORE_get_next (datastore, GNUNET_YES);
+ return;
+ }
crc->key = *key;
crc->esize = size;
memcpy (crc->data, data, size);
+ GNUNET_DATASTORE_get_next (datastore, GNUNET_YES);
}
GNUNET_TIME_relative_to_absolute
(GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS,
GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 1000))),
- TIMEOUT,
+ 1, 1, TIMEOUT,
&check_success,
crc);
break;
case RP_CUT:
/* trim down below MAX_SIZE again */
GNUNET_DATASTORE_get_random (datastore,
+ 1, 1, TIMEOUT,
&delete_value,
- crc,
- TIMEOUT);
+ crc);
break;
case RP_REPORT:
printf (
crc->phase = RP_PUT;
crc->j = 0;
GNUNET_SCHEDULER_add_continuation (crc->sched,
- GNUNET_NO,
&run_continuation,
crc,
GNUNET_SCHEDULER_REASON_PREREQ_DONE);
GNUNET_free (crc);
ok = 0;
break;
+ default:
+ GNUNET_assert (0);
}
}
crc->cfg = cfg;
crc->phase = RP_PUT;
GNUNET_SCHEDULER_add_continuation (crc->sched,
- GNUNET_NO,
&run_continuation,
crc,
GNUNET_SCHEDULER_REASON_PREREQ_DONE);
struct GNUNET_GETOPT_CommandLineOption options[] = {
GNUNET_GETOPT_OPTION_END
};
- pid = GNUNET_OS_start_process ("gnunet-service-datastore",
- "gnunet-service-datastore",
+ pid = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm",
+ "gnunet-service-arm",
#if VERBOSE
"-L", "DEBUG",
#endif
"-c", "test_datastore_api_data.conf", NULL);
- sleep (1);
GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1,
argv, "perf-datastore-api", "nohelp",
options, &run, NULL);
{
int ret;
- GNUNET_DISK_directory_remove ("/tmp/test-gnunetd-datastore");
+ GNUNET_DISK_directory_remove ("/tmp/test-gnunet-datastore");
GNUNET_log_setup ("perf-datastore-api",
#if VERBOSE
"DEBUG",
#if REPORT_ID
fprintf (stderr, "\n");
#endif
+ GNUNET_DISK_directory_remove ("/tmp/test-gnunet-datastore");
return ret;
}