aboutsummaryrefslogtreecommitdiff
path: root/src/mintdb/perf_taler_mintdb.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-06-11 16:03:11 +0200
committerChristian Grothoff <christian@grothoff.org>2015-06-11 16:03:11 +0200
commit239aaf53d49a6c6f23e060d14d69f6aa135380d7 (patch)
tree8b55fa5b582e44a6df78efd8ab0fd1a5a427cf9e /src/mintdb/perf_taler_mintdb.c
parentdd2ab3aae326017be2b75bbe9bc794c52f42c1ec (diff)
parent655073f6d508c8f540a6fe7957713133057ab9b6 (diff)
Merge branch 'master' of git+ssh://git.taler.net/var/git/mint
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;