From eba2a5d90c1dbc2e5121e404ac4154dc70d9cace Mon Sep 17 00:00:00 2001 From: Joseph Date: Mon, 21 Nov 2022 10:37:50 -0500 Subject: new batch insertion code --- src/exchangedb/test_exchangedb_by_j.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/exchangedb/test_exchangedb_by_j.c') diff --git a/src/exchangedb/test_exchangedb_by_j.c b/src/exchangedb/test_exchangedb_by_j.c index 831416b4..b2f6ddeb 100644 --- a/src/exchangedb/test_exchangedb_by_j.c +++ b/src/exchangedb/test_exchangedb_by_j.c @@ -114,8 +114,10 @@ run (void *cls) &value)); now = GNUNET_TIME_absolute_get (); ts = GNUNET_TIME_timestamp_get (); - plugin->start (plugin->cls, - "test_by_j"); + for (unsigned int r=0;r<10;r++) + { + plugin->start_read_committed (plugin->cls, + "test_by_j"); for (unsigned int k = 0; kbatch_reserves_in_insert (plugin->cls, reserves, batch_size, results)); plugin->commit (plugin->cls); + } duration = GNUNET_TIME_absolute_get_duration (now); fprintf (stdout, "for a batchsize equal to %d it took %s\n", @@ -141,6 +144,7 @@ run (void *cls) GNUNET_STRINGS_relative_time_to_string (duration, GNUNET_NO) ); } + result = 0; drop: GNUNET_break (GNUNET_OK == plugin->drop_tables (plugin->cls)); -- cgit v1.2.3