summaryrefslogtreecommitdiff
path: root/src/mintdb/perf_taler_mintdb.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-06-12 11:47:06 +0200
committerChristian Grothoff <christian@grothoff.org>2015-06-12 11:47:06 +0200
commitc80435c815e902f6df8826b99809b24abeef95d3 (patch)
tree5cba6e3c596e85711e94da8fb99f84373a841632 /src/mintdb/perf_taler_mintdb.c
parent9891cafe12e48f2e79d47a0c62780ebeb4f6876a (diff)
parentec56e47809783fde3adfe159af0ec8e828a1f385 (diff)
downloadexchange-c80435c815e902f6df8826b99809b24abeef95d3.tar.gz
exchange-c80435c815e902f6df8826b99809b24abeef95d3.tar.bz2
exchange-c80435c815e902f6df8826b99809b24abeef95d3.zip
Merge branch 'master' of git+ssh://taler.net/var/git/mint
Diffstat (limited to 'src/mintdb/perf_taler_mintdb.c')
-rw-r--r--src/mintdb/perf_taler_mintdb.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/src/mintdb/perf_taler_mintdb.c b/src/mintdb/perf_taler_mintdb.c
index 5d67b87e0..c7e8c3552 100644
--- a/src/mintdb/perf_taler_mintdb.c
+++ b/src/mintdb/perf_taler_mintdb.c
@@ -18,8 +18,8 @@
* @brief Mint database performance analysis
* @author Nicolas Fournier
*/
+#include "platform.h"
#include "perf_taler_mintdb_interpreter.h"
-#include "./perf_taler_mintdb_init.h"
#include "perf_taler_mintdb_values.h"
/**
@@ -29,18 +29,8 @@
int
main (int argc, char ** argv)
{
- struct GNUNET_CONFIGURATION_Handle *config =
- GNUNET_CONFIGURATION_create();
-
- GNUNET_CONFIGURATION_load(config, "./test-mint-db-postgres.conf");
-
- 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);
-
-
+ struct TALER_MINTDB_Plugin *plugin;
+ struct GNUNET_CONFIGURATION_Handle *config;
struct PERF_TALER_MINTDB_Cmd test[] =
{
PERF_TALER_MINTDB_INIT_CMD_LOOP ("loop_db_init_deposit",100000),
@@ -48,14 +38,23 @@ main (int argc, char ** argv)
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_INIT_CMD_END("end")
};
+ config = GNUNET_CONFIGURATION_create();
+ GNUNET_CONFIGURATION_load(config, "./test-mint-db-postgres.conf");
+ GNUNET_assert (NULL !=
+ (plugin = TALER_MINTDB_plugin_load (config)));
+ plugin->create_tables (plugin->cls, GNUNET_YES);
PERF_TALER_MINTDB_interpret(plugin, test);
+ {
+ struct TALER_MINTDB_Session *session;
+ session = plugin->get_session (plugin->cls, GNUNET_YES);
+ plugin->drop_temporary (plugin->cls, session);
+ }
TALER_MINTDB_plugin_unload(plugin);
+ GNUNET_CONFIGURATION_destroy(config);
return GNUNET_OK;
}