aboutsummaryrefslogtreecommitdiff
path: root/src/mintdb/perf_taler_mintdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mintdb/perf_taler_mintdb.c')
-rw-r--r--src/mintdb/perf_taler_mintdb.c43
1 files changed, 21 insertions, 22 deletions
diff --git a/src/mintdb/perf_taler_mintdb.c b/src/mintdb/perf_taler_mintdb.c
index 832332c61..5d67b87e0 100644
--- a/src/mintdb/perf_taler_mintdb.c
+++ b/src/mintdb/perf_taler_mintdb.c
@@ -19,43 +19,42 @@
* @author Nicolas Fournier
*/
#include "perf_taler_mintdb_interpreter.h"
+#include "./perf_taler_mintdb_init.h"
#include "perf_taler_mintdb_values.h"
/**
* Runs the performances tests for the mint database
+ * and logs the results using Gauger
*/
int
-main(int argc, char ** argv)
+main (int argc, char ** argv)
{
+ struct GNUNET_CONFIGURATION_Handle *config =
+ GNUNET_CONFIGURATION_create();
- struct PERF_TALER_MINTDB_CMD test[] =
- {
- INIT_CMD_LOOP("loop_db_init_deposit",100000),
- INIT_CMD_START_TRANSACTION("start_transaction_init"),
- INIT_CMD_INSERT_DEPOSIT("init_deposit_insert"),
- INIT_CMD_COMMIT_TRANSACTION("commit_transaction_init"),
- INIT_CMD_END_LOOP("endloop_init_deposit","loop_db_init_deposit"),
-
-
- INIT_CMD_END("end")
- };
+ GNUNET_CONFIGURATION_load(config, "./test-mint-db-postgres.conf");
- struct GNUNET_CONFIGURATION_Handle config ;
- GNUNET_CONFIGURATION_load(*config "./test-mint-db-postgres.conf");
-
- struct TALER_MINTDB_Plugin *plugin = TALER_MINTDB_plugin_load(&config);
- struct TALER_MINTDB_Session *session = plugin->get_session(plugin->cls, GNUNET_YES);
-
+ struct TALER_MINTDB_Plugin *plugin = TALER_MINTDB_plugin_load (config);
+ GNUNET_CONFIGURATION_destroy(config);
+
// creation of temporary tables
- plugin->create_tables(plugin->cls, GNUNET_YES);
+ plugin->create_tables (plugin->cls, GNUNET_YES);
+
+ struct PERF_TALER_MINTDB_Cmd test[] =
+ {
+ PERF_TALER_MINTDB_INIT_CMD_LOOP ("loop_db_init_deposit",100000),
+ PERF_TALER_MINTDB_INIT_CMD_START_TRANSACTION ("start_transaction_init"),
+ PERF_TALER_MINTDB_INIT_CMD_INSERT_DEPOSIT ("init_deposit_insert"),
+ PERF_TALER_MINTDB_INIT_CMD_COMMIT_TRANSACTION ("commit_transaction_init"),
+ PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("endloop_init_deposit","loop_db_init_deposit"),
- PERF_TALER_MINTDB_interpret(plugin, session, test);
+ PERF_TALER_MINTDB_INIT_CMD_END("end")
+ };
- plugin->drop_temporary(plugin->cls, session);
+ PERF_TALER_MINTDB_interpret(plugin, test);
- // Free the session ??
TALER_MINTDB_plugin_unload(plugin);
return GNUNET_OK;