summaryrefslogtreecommitdiff
path: root/src/mintdb/perf_taler_mintdb.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-06-30 21:25:26 +0200
committerChristian Grothoff <christian@grothoff.org>2015-06-30 21:25:26 +0200
commitde430aa4646312b0f68b4e03fb1c8f557ef99c2b (patch)
tree62982f70157a4fb4ca67bd9648b3cf25806d14c8 /src/mintdb/perf_taler_mintdb.c
parentc154e50148794f498259b835d9ac064660e769aa (diff)
parentd0a6b47099384e39e820687fe7b83628514a6382 (diff)
downloadexchange-de430aa4646312b0f68b4e03fb1c8f557ef99c2b.tar.gz
exchange-de430aa4646312b0f68b4e03fb1c8f557ef99c2b.tar.bz2
exchange-de430aa4646312b0f68b4e03fb1c8f557ef99c2b.zip
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.c99
1 files changed, 75 insertions, 24 deletions
diff --git a/src/mintdb/perf_taler_mintdb.c b/src/mintdb/perf_taler_mintdb.c
index 0b1e48075..53c9a1c24 100644
--- a/src/mintdb/perf_taler_mintdb.c
+++ b/src/mintdb/perf_taler_mintdb.c
@@ -31,32 +31,83 @@ main (int argc, char ** argv)
{
struct TALER_MINTDB_Plugin *plugin;
struct GNUNET_CONFIGURATION_Handle *config;
- struct PERF_TALER_MINTDB_Cmd test[] =
+ struct PERF_TALER_MINTDB_Cmd test[] =
{
- PERF_TALER_MINTDB_INIT_CMD_LOOP ("loop_db_init_deposit",10000),
- 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_SAVE_ARRAY ("array_depo",
- "loop_db_init_deposit",
- "init_deposit_insert",
- 100,
- PERF_TALER_MINTDB_DEPOSIT),
- PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("endloop_init_deposit",
- "loop_db_init_deposit"),
- PERF_TALER_MINTDB_INIT_CMD_DEBUG("Fin loop 1"),
- PERF_TALER_MINTDB_INIT_CMD_LOOP ("loop_deposit_get",100),
- PERF_TALER_MINTDB_INIT_CMD_START_TRANSACTION ("start_transaction_get"),
- PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY("load deposit",
- "loop_deposit_get",
- "array_depo"),
- PERF_TALER_MINTDB_INIT_CMD_GET_DEPOSIT("get_deposit",
- "load_deposit"),
- PERF_TALER_MINTDB_INIT_CMD_COMMIT_TRANSACTION ("commit_transaction_init"),
- PERF_TALER_MINTDB_INIT_CMD_END_LOOP("stop2", "loop_deposit_get"),
- PERF_TALER_MINTDB_INIT_CMD_END("end")
+ // Denomination used to create coins
+ PERF_TALER_MINTDB_INIT_CMD_DEBUG ("00 - Start of interpretor"),
+
+ PERF_TALER_MINTDB_INIT_CMD_LOOP ("01 - denomination loop",
+ PERF_TALER_MINTDB_NB_DENOMINATION_INIT),
+ PERF_TALER_MINTDB_INIT_CMD_START_TRANSACTION ("01 - start transaction"),
+ PERF_TALER_MINTDB_INIT_CMD_INSERT_DENOMINATION ("01 - denomination"),
+ PERF_TALER_MINTDB_INIT_CMD_COMMIT_TRANSACTION ("01 - commit transaction"),
+ PERF_TALER_MINTDB_INIT_CMD_SAVE_ARRAY ("01 - save denomination",
+ "01 - denomination loop",
+ "01 - denomination",
+ PERF_TALER_MINTDB_NB_DENOMINATION_SAVE),
+ PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("01 - denomination loop end",
+ "01 - denomination loop"),
+ PERF_TALER_MINTDB_INIT_CMD_DEBUG ("01 - init denomination complete"),
+ // End of initialization
+ // Reserve initialization
+ PERF_TALER_MINTDB_INIT_CMD_LOOP ("02 - init reserve loop",
+ PERF_TALER_MINTDB_NB_RESERVE_INIT),
+ PERF_TALER_MINTDB_INIT_CMD_INSERT_RESERVE ("02 - reserve"),
+ PERF_TALER_MINTDB_INIT_CMD_SAVE_ARRAY ("02 - save reserve",
+ "02 - init reserve loop",
+ "02 - reserve",
+ PERF_TALER_MINTDB_NB_RESERVE_SAVE),
+ PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("02 - init reserve end loop",
+ "02 - init reserve loop"),
+ PERF_TALER_MINTDB_INIT_CMD_DEBUG ("02 - reserve init complete"),
+ // End reserve init
+ // Withdrawal initialization
+ PERF_TALER_MINTDB_INIT_CMD_LOOP ("03 - init withdraw loop",
+ PERF_TALER_MINTDB_NB_WITHDRAW_INIT),
+ // PERF_TALER_MINTDB_INIT_CMD_START_TRANSACTION ("03 - start transaction"),
+ PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("03 - denomination load",
+ "03 - init withdraw loop",
+ "01 - save denomination"),
+ PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("03 - reserve load",
+ "03 - init withdraw loop",
+ "02 - save reserve"),
+ PERF_TALER_MINTDB_INIT_CMD_INSERT_WITHDRAW ("03 - withdraw",
+ "03 - denomination load",
+ "03 - reserve load"),
+ // PERF_TALER_MINTDB_INIT_CMD_COMMIT_TRANSACTION ("03 - commit transaction"),
+ PERF_TALER_MINTDB_INIT_CMD_SAVE_ARRAY ("03 - blindcoin array",
+ "03 - init withdraw loop",
+ "03 - withdraw",
+ PERF_TALER_MINTDB_NB_WITHDRAW_SAVE),
+ PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("03 - withdraw init end loop",
+ "03 - init withdraw loop"),
+ PERF_TALER_MINTDB_INIT_CMD_DEBUG ("03 - withdraw init complete"),
+ //End of withdrawal initialization
+ //Deposit initialization
+ PERF_TALER_MINTDB_INIT_CMD_LOOP ("04 - deposit init loop",
+ PERF_TALER_MINTDB_NB_DEPOSIT_INIT),
+ PERF_TALER_MINTDB_INIT_CMD_START_TRANSACTION ("04 - start transaction"),
+ PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("04 - denomination load",
+ "04 - deposit init loop",
+ "01 - save denomination"),
+
+ PERF_TALER_MINTDB_INIT_CMD_INSERT_DEPOSIT ("04 - deposit",
+ "04 - denomination load"),
+ PERF_TALER_MINTDB_INIT_CMD_COMMIT_TRANSACTION ("04 - commit transaction"),
+ PERF_TALER_MINTDB_INIT_CMD_SAVE_ARRAY ("04 - deposit array",
+ "04 - deposit init loop",
+ "04 - deposit",
+ PERF_TALER_MINTDB_NB_DEPOSIT_SAVE),
+ PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("04 - deposit init loop end",
+ "04 - deposit init loop"),
+ PERF_TALER_MINTDB_INIT_CMD_DEBUG ("04 - deposit init complete"),
+ // End of deposit initialization
+ PERF_TALER_MINTDB_INIT_CMD_END ("end"),
};
- // Plugin init
+
+ GNUNET_log_setup ("perf-taler-mintdb",
+ "INFO",
+ NULL);
config = GNUNET_CONFIGURATION_create();
GNUNET_CONFIGURATION_load(config, "./test-mint-db-postgres.conf");
GNUNET_assert (NULL !=