diff options
author | Fournier Nicolas <nicolas.fournier@ensta-paristech.fr> | 2015-07-06 15:54:48 +0200 |
---|---|---|
committer | Fournier Nicolas <nicolas.fournier@ensta-paristech.fr> | 2015-07-06 15:54:48 +0200 |
commit | 3e7abf8a36af338e299d9e0a488e97f03a43115e (patch) | |
tree | ca44a0318933cf4141c09bc15a9160f291e5a583 | |
parent | 12eee234abce0db80f5e1f5a3d08d543404cf5a1 (diff) |
perf test is now part of the automated tests
-rw-r--r-- | src/mintdb/Makefile.am | 10 | ||||
-rw-r--r-- | src/mintdb/perf_taler_mintdb.c | 33 | ||||
-rw-r--r-- | src/mintdb/perf_taler_mintdb_interpreter.h | 3 | ||||
-rw-r--r-- | src/mintdb/test_perf_taler_mintdb.c | 2 |
4 files changed, 24 insertions, 24 deletions
diff --git a/src/mintdb/Makefile.am b/src/mintdb/Makefile.am index 3c0b87b97..544519011 100644 --- a/src/mintdb/Makefile.am +++ b/src/mintdb/Makefile.am @@ -50,10 +50,11 @@ check_PROGRAMS = \ test-mintdb-keyio \ test-mintdb-postgres \ test-perf-taler-mintdb \ - perf-mintdb + perf-taler-mintdb TESTS = \ - test-mintdb-postgres + test-mintdb-postgres \ + test-perf-taler-mintdb test_mintdb_deposits_SOURCES = \ test_mintdb_deposits.c @@ -92,12 +93,11 @@ test_perf_taler_mintdb_LDADD = \ -ljansson \ -lgnunetutil -perf_mintdb_SOURCES = \ +perf_taler_mintdb_SOURCES = \ perf_taler_mintdb.c \ perf_taler_mintdb_init.c \ perf_taler_mintdb_interpreter.c - -perf_mintdb_LDADD = \ +perf_taler_mintdb_LDADD = \ libtalermintdb.la \ $(top_srcdir)/src/util/libtalerutil.la \ $(top_srcdir)/src/pq/libtalerpq.la \ diff --git a/src/mintdb/perf_taler_mintdb.c b/src/mintdb/perf_taler_mintdb.c index 91d61f467..27731f08b 100644 --- a/src/mintdb/perf_taler_mintdb.c +++ b/src/mintdb/perf_taler_mintdb.c @@ -20,20 +20,19 @@ */ #include "platform.h" #include "perf_taler_mintdb_interpreter.h" -#include "perf_taler_mintdb_values.h" -#define PERF_TALER_MINTDB_NB_DENOMINATION_INIT 10 -#define PERF_TALER_MINTDB_NB_DENOMINATION_SAVE 10 +#define NB_DENOMINATION_INIT 10 +#define NB_DENOMINATION_SAVE 10 -#define PERF_TALER_MINTDB_NB_RESERVE_INIT 100 -#define PERF_TALER_MINTDB_NB_RESERVE_SAVE 10 +#define NB_RESERVE_INIT 1000 +#define NB_RESERVE_SAVE 100 -#define PERF_TALER_MINTDB_NB_DEPOSIT_INIT 100 -#define PERF_TALER_MINTDB_NB_DEPOSIT_SAVE 10 +#define NB_DEPOSIT_INIT 1000 +#define NB_DEPOSIT_SAVE 100 -#define PERF_TALER_MINTDB_NB_WITHDRAW_INIT 100 -#define PERF_TALER_MINTDB_NB_WITHDRAW_SAVE 10 +#define NB_WITHDRAW_INIT 1000 +#define NB_WITHDRAW_SAVE 100 /** * Runs the performances tests for the mint database @@ -49,33 +48,33 @@ main (int argc, char ** argv) PERF_TALER_MINTDB_INIT_CMD_DEBUG ("00 - Start of interpreter"), PERF_TALER_MINTDB_INIT_CMD_LOOP ("01 - denomination loop", - PERF_TALER_MINTDB_NB_DENOMINATION_INIT), + 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), + 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), + 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), + 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), + 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", @@ -90,14 +89,14 @@ main (int argc, char ** argv) PERF_TALER_MINTDB_INIT_CMD_SAVE_ARRAY ("03 - blindcoin array", "03 - init withdraw loop", "03 - withdraw", - PERF_TALER_MINTDB_NB_WITHDRAW_SAVE), + 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), + 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", @@ -108,7 +107,7 @@ main (int argc, char ** argv) PERF_TALER_MINTDB_INIT_CMD_SAVE_ARRAY ("04 - deposit array", "04 - deposit init loop", "04 - deposit", - PERF_TALER_MINTDB_NB_DEPOSIT_SAVE), + 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"), diff --git a/src/mintdb/perf_taler_mintdb_interpreter.h b/src/mintdb/perf_taler_mintdb_interpreter.h index e4fe5fc82..1cb9cfdee 100644 --- a/src/mintdb/perf_taler_mintdb_interpreter.h +++ b/src/mintdb/perf_taler_mintdb_interpreter.h @@ -111,11 +111,12 @@ * Commits the duration between @a _label_start and @a _label_stop * to Gauger with @a _description explaining what was measured. * + * @param _label the label of this command * @param _label_start label of the start of the measurment * @param _label_stop label of the end of the measurment * @param _description description of the measure displayed in Gauger * @param _unit the unit of the data measured, typicly something/sec - * @param _divide number of measurments in the interval [FIXME: need UNIT] + * @param _divide number of measurments in the interval */ #define PERF_TALER_MINTDB_INIT_CMD_GAUGER(_label, _label_start, _label_stop, _description, _unit, _divide) \ { \ diff --git a/src/mintdb/test_perf_taler_mintdb.c b/src/mintdb/test_perf_taler_mintdb.c index 649324f6f..7dad14f04 100644 --- a/src/mintdb/test_perf_taler_mintdb.c +++ b/src/mintdb/test_perf_taler_mintdb.c @@ -132,7 +132,7 @@ main (int argc, char ** argv) init, benchmark); - if (GNUNET_SYSERR != ret) + if (GNUNET_SYSERR == ret) return 1; return 0; } |