diff options
Diffstat (limited to 'src/mintdb/perf_taler_mintdb.c')
-rw-r--r-- | src/mintdb/perf_taler_mintdb.c | 194 |
1 files changed, 107 insertions, 87 deletions
diff --git a/src/mintdb/perf_taler_mintdb.c b/src/mintdb/perf_taler_mintdb.c index 358629a95..88e2b5a59 100644 --- a/src/mintdb/perf_taler_mintdb.c +++ b/src/mintdb/perf_taler_mintdb.c @@ -25,8 +25,9 @@ #define NB_DENOMINATION_INIT 15 #define NB_DENOMINATION_SAVE 15 -#define BIGGER 100000 -#define BIG 10000 +#define SMALL 10 +#define BIG 100 +#define BIGGER 1000 #define NB_RESERVE_INIT BIGGER #define NB_RESERVE_SAVE BIG @@ -40,6 +41,9 @@ #define NB_REFRESH_INIT BIGGER #define NB_REFRESH_SAVE BIG +#define NB_MELT_INIT BIG +#define NB_MELT_SAVE SMALL + /** * Runs the performances tests for the mint database * and logs the results using Gauger @@ -137,7 +141,7 @@ main (int argc, char ** argv) /* End of refresh session initialization */ /* Refresh melt initialization */ PERF_TALER_MINTDB_INIT_CMD_LOOP ("06 - refresh melt init loop", - NB_REFRESH_INIT), + NB_MELT_INIT), PERF_TALER_MINTDB_INIT_CMD_START_TRANSACTION (""), PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("06 - session hash", "06 - refresh melt init loop", @@ -155,58 +159,58 @@ main (int argc, char ** argv) PERF_TALER_MINTDB_INIT_CMD_DEBUG ("End of initialization"), PERF_TALER_MINTDB_INIT_CMD_DEBUG ("Start of performances measuring"), - PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("05 - start"), - PERF_TALER_MINTDB_INIT_CMD_LOOP ("05 - reserve insert measure", + PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("21 - start"), + PERF_TALER_MINTDB_INIT_CMD_LOOP ("21 - reserve insert measure", NB_RESERVE_SAVE), - PERF_TALER_MINTDB_INIT_CMD_CREATE_RESERVE ("05 - reserve"), - PERF_TALER_MINTDB_INIT_CMD_INSERT_RESERVE ("05 - insert", - "05 - reserve"), + PERF_TALER_MINTDB_INIT_CMD_CREATE_RESERVE ("21 - reserve"), + PERF_TALER_MINTDB_INIT_CMD_INSERT_RESERVE ("21 - insert", + "21 - reserve"), PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("", - "05 - reserve insert measure"), - PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("05 - stop"), - PERF_TALER_MINTDB_INIT_CMD_GAUGER ("05 - gauger", - "05 - start", - "05 - stop", + "21 - reserve insert measure"), + PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("21 - stop"), + PERF_TALER_MINTDB_INIT_CMD_GAUGER ("21 - gauger", + "21 - start", + "21 - stop", "POSTGRES", "Number of reserve inserted per second", "item/sec", NB_RESERVE_SAVE), PERF_TALER_MINTDB_INIT_CMD_DEBUG ("End of reserve insertion"), - PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("06 - start"), - PERF_TALER_MINTDB_INIT_CMD_LOOP ("06 - reserve load measure", + PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("22 - start"), + PERF_TALER_MINTDB_INIT_CMD_LOOP ("22 - reserve load measure", NB_RESERVE_SAVE), - PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("06 - reserve", - "06 - reserve load measure", + PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("22 - reserve", + "22 - reserve load measure", "02 - save reserve"), - PERF_TALER_MINTDB_INIT_CMD_GET_RESERVE ("06 - get", - "06 - reserve"), + PERF_TALER_MINTDB_INIT_CMD_GET_RESERVE ("22 - get", + "22 - reserve"), PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("", - "06 - reserve load measure"), - PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("06 - stop"), + "22 - reserve load measure"), + PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("22 - stop"), PERF_TALER_MINTDB_INIT_CMD_GAUGER ("", - "06 - start", - "06 - stop", + "22 - start", + "22 - stop", "POSTGRES", "Number of reserve loaded per second", "item/sec", NB_RESERVE_SAVE), PERF_TALER_MINTDB_INIT_CMD_DEBUG ("End of reserve retreival"), - PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("07 - start"), - PERF_TALER_MINTDB_INIT_CMD_LOOP ("07 - reserve history measure", + PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("23 - start"), + PERF_TALER_MINTDB_INIT_CMD_LOOP ("23 - reserve history measure", NB_RESERVE_SAVE), - PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("07 - reserve", - "07 - reserve history measure", + PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("23 - reserve", + "23 - reserve history measure", "02 - save reserve"), PERF_TALER_MINTDB_INIT_CMD_GET_RESERVE_HISTORY ("", - "07 - reserve"), + "23 - reserve"), PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("", - "07 - reserve history measure"), - PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("07 - stop"), + "23 - reserve history measure"), + PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("23 - stop"), PERF_TALER_MINTDB_INIT_CMD_GAUGER ("", - "07 - start", - "07 - stop", + "23 - start", + "23 - stop", "POSTGRES", "Number of reserve history loaded per second", "item/sec", @@ -214,114 +218,130 @@ main (int argc, char ** argv) PERF_TALER_MINTDB_INIT_CMD_DEBUG ("End of reserve history access"), - PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("08 - start"), - PERF_TALER_MINTDB_INIT_CMD_LOOP ("08 - withdraw insert measure", + PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("24 - start"), + PERF_TALER_MINTDB_INIT_CMD_LOOP ("24 - withdraw insert measure", NB_WITHDRAW_SAVE), - PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("08 - reserve", - "08 - withdraw insert measure", + PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("24 - reserve", + "24 - withdraw insert measure", "02 - save reserve"), - PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("08 - denomination", - "08 - withdraw insert measure", + PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("24 - denomination", + "24 - withdraw insert measure", "01 - save denomination"), - PERF_TALER_MINTDB_INIT_CMD_CREATE_WITHDRAW ("08 - withdraw", - "08 - denomination", - "08 - reserve"), - PERF_TALER_MINTDB_INIT_CMD_INSERT_WITHDRAW ("08 - insert", - "08 - withdraw"), + PERF_TALER_MINTDB_INIT_CMD_CREATE_WITHDRAW ("24 - withdraw", + "24 - denomination", + "24 - reserve"), + PERF_TALER_MINTDB_INIT_CMD_INSERT_WITHDRAW ("24 - insert", + "24 - withdraw"), PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("", - "08 - withdraw insert measure"), - PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("08 - stop"), + "24 - withdraw insert measure"), + PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("24 - stop"), PERF_TALER_MINTDB_INIT_CMD_GAUGER ("", - "08 - start", - "08 - stop", + "24 - start", + "24 - stop", "POSTGRES", "Number of withdraw insert per second", "item/sec", NB_WITHDRAW_SAVE), PERF_TALER_MINTDB_INIT_CMD_DEBUG ("End of withdraw insertion"), - PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("09 - start"), - PERF_TALER_MINTDB_INIT_CMD_LOOP ("09 - withdraw insert measure", + PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("25 - start"), + PERF_TALER_MINTDB_INIT_CMD_LOOP ("25 - withdraw insert measure", NB_RESERVE_SAVE), - PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("09 - coin", - "09 - withdraw insert measure", + PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("25 - coin", + "25 - withdraw insert measure", "03 - save coin"), PERF_TALER_MINTDB_INIT_CMD_GET_WITHDRAW ("", - "09 - coin"), + "25 - coin"), PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("", - "09 - withdraw insert measure"), - PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("09 - stop"), + "25 - withdraw insert measure"), + PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("25 - stop"), PERF_TALER_MINTDB_INIT_CMD_GAUGER ("", - "09 - start", - "09 - stop", + "25 - start", + "25 - stop", "POSTGRES", "Number of withdraw loaded per second", "item/sec", NB_RESERVE_SAVE), PERF_TALER_MINTDB_INIT_CMD_DEBUG ("End of withdraw loading"), - PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("10 - start"), - PERF_TALER_MINTDB_INIT_CMD_LOOP ("10 - get coin transaction", + PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("26 - start"), + PERF_TALER_MINTDB_INIT_CMD_LOOP ("26 - get coin transaction", NB_WITHDRAW_SAVE), - PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("10 - coin", - "10 - get coin transaction", + PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("26 - coin", + "26 - get coin transaction", "03 - save coin"), PERF_TALER_MINTDB_INIT_CMD_GET_COIN_TRANSACTION("", - "10 - coin"), + "26 - coin"), PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("", - "10 - get coin transaction"), - PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("10 - end"), + "26 - get coin transaction"), + PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("26 - end"), PERF_TALER_MINTDB_INIT_CMD_GAUGER ("", - "10 - start", - "10 - end", + "26 - start", + "26 - end", "POSTGRES", "Number of coin transaction history loaded per second", "item/sec", NB_WITHDRAW_SAVE), PERF_TALER_MINTDB_INIT_CMD_DEBUG ("End of transaction loading"), - PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("11 - start"), - PERF_TALER_MINTDB_INIT_CMD_LOOP ("11 - /withdraw/sign", + PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("27 - start"), + PERF_TALER_MINTDB_INIT_CMD_LOOP ("27 - /withdraw/sign", NB_WITHDRAW_SAVE), - PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("11 - reserve", - "11 - /withdraw/sign", + PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("27 - reserve", + "27 - /withdraw/sign", "02 - save reserve"), - PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("11 - dki", - "11 - /withdraw/sign", + PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("27 - dki", + "27 - /withdraw/sign", "01 - save denomination"), PERF_TALER_MINTDB_INIT_CMD_WITHDRAW_SIGN ("", - "11 - dki", - "11 - reserve"), + "27 - dki", + "27 - reserve"), PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("", - "11 - /withdraw/sign"), - PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("11 - end"), + "27 - /withdraw/sign"), + PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("27 - end"), PERF_TALER_MINTDB_INIT_CMD_GAUGER ("", - "11 - start", - "11 - end", + "27 - start", + "27 - end", "POSTGRES", "Number of /withdraw/sign per second", "item/sec", NB_WITHDRAW_SAVE), PERF_TALER_MINTDB_INIT_CMD_DEBUG ("End of /withdraw/sign"), - PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("12 - start"), - PERF_TALER_MINTDB_INIT_CMD_LOOP ("12 - /deposit", + PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("28 - start"), + PERF_TALER_MINTDB_INIT_CMD_LOOP ("28 - /deposit", NB_DEPOSIT_SAVE), - PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("12 - coin", - "12 - /deposit", + PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("28 - coin", + "28 - /deposit", "03 - save coin"), - PERF_TALER_MINTDB_INIT_CMD_DEPOSIT ("12 - deposit", - "12 - coin"), + PERF_TALER_MINTDB_INIT_CMD_DEPOSIT ("28 - deposit", + "28 - coin"), PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("", - "12 - /deposit"), - PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("12 - stop"), + "28 - /deposit"), + PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("28 - stop"), PERF_TALER_MINTDB_INIT_CMD_GAUGER ("", - "12 - start", - "12 - stop", + "28 - start", + "28 - stop", "POSTGRES", "Number of /deposit per second", "item/sec", NB_DEPOSIT_SAVE), + PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("29 - start"), + PERF_TALER_MINTDB_INIT_CMD_LOOP ("29 - insert refresh session", + NB_REFRESH_SAVE), + PERF_TALER_MINTDB_INIT_CMD_START_TRANSACTION (""), + PERF_TALER_MINTDB_INIT_CMD_CREATE_REFRESH_SESSION (""), + PERF_TALER_MINTDB_INIT_CMD_COMMIT_TRANSACTION (""), + PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("", + "29 - insert refresh session"), + PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("29 - stop"), + PERF_TALER_MINTDB_INIT_CMD_GAUGER ("", + "29 - start", + "29 - stop", + "POSTGRES", + "Number of refresh session inserted per second", + "item/sec", + NB_REFRESH_SAVE), PERF_TALER_MINTDB_INIT_CMD_END (""), }; |