summaryrefslogtreecommitdiff
path: root/src/exchangedb/perf_exchangedb_reserves_in_insert.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/exchangedb/perf_exchangedb_reserves_in_insert.c')
-rw-r--r--src/exchangedb/perf_exchangedb_reserves_in_insert.c46
1 files changed, 20 insertions, 26 deletions
diff --git a/src/exchangedb/perf_exchangedb_reserves_in_insert.c b/src/exchangedb/perf_exchangedb_reserves_in_insert.c
index 9a0ec0944..fc2a00089 100644
--- a/src/exchangedb/perf_exchangedb_reserves_in_insert.c
+++ b/src/exchangedb/perf_exchangedb_reserves_in_insert.c
@@ -83,21 +83,14 @@ run (void *cls)
}
(void) plugin->drop_tables (plugin->cls);
if (GNUNET_OK !=
- plugin->create_tables (plugin->cls))
+ plugin->create_tables (plugin->cls,
+ true,
+ num_partitions))
{
GNUNET_break (0);
result = 77;
goto cleanup;
}
- if (GNUNET_OK !=
- plugin->setup_partitions (plugin->cls,
- num_partitions))
- {
- GNUNET_break (0);
- result = 77;
- goto cleanup;
- }
-
for (unsigned int i = 0; i< 8; i++)
{
static unsigned int batches[] = {1, 1, 0, 2, 4, 16, 64, 256};
@@ -114,23 +107,23 @@ run (void *cls)
&value));
now = GNUNET_TIME_absolute_get ();
ts = GNUNET_TIME_timestamp_get ();
- for (unsigned int r=0;r<10;r++)
- {
- plugin->start (plugin->cls,
- "test_by_exchange_j");
- for (unsigned int k = 0; k<batch_size; k++)
+ for (unsigned int r = 0; r<10; r++)
{
- RND_BLK (&reserve_pub);
- FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
- plugin->reserves_in_insert (plugin->cls,
- &reserve_pub,
- &value,
- ts,
- sndr,
- "section",
- 4));
- }
- plugin->commit (plugin->cls);
+ plugin->start (plugin->cls,
+ "test_by_exchange_j");
+ for (unsigned int k = 0; k<batch_size; k++)
+ {
+ RND_BLK (&reserve_pub);
+ FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
+ plugin->reserves_in_insert (plugin->cls,
+ &reserve_pub,
+ &value,
+ ts,
+ sndr,
+ "section",
+ 4));
+ }
+ plugin->commit (plugin->cls);
}
duration = GNUNET_TIME_absolute_get_duration (now);
fprintf (stdout,
@@ -196,4 +189,5 @@ main (int argc,
return result;
}
+
/* end of test_exchangedb_by_j.c */