perf test is now part of the automated tests
This commit is contained in:
parent
12eee234ab
commit
3e7abf8a36
@ -50,10 +50,11 @@ check_PROGRAMS = \
|
|||||||
test-mintdb-keyio \
|
test-mintdb-keyio \
|
||||||
test-mintdb-postgres \
|
test-mintdb-postgres \
|
||||||
test-perf-taler-mintdb \
|
test-perf-taler-mintdb \
|
||||||
perf-mintdb
|
perf-taler-mintdb
|
||||||
|
|
||||||
TESTS = \
|
TESTS = \
|
||||||
test-mintdb-postgres
|
test-mintdb-postgres \
|
||||||
|
test-perf-taler-mintdb
|
||||||
|
|
||||||
test_mintdb_deposits_SOURCES = \
|
test_mintdb_deposits_SOURCES = \
|
||||||
test_mintdb_deposits.c
|
test_mintdb_deposits.c
|
||||||
@ -92,12 +93,11 @@ test_perf_taler_mintdb_LDADD = \
|
|||||||
-ljansson \
|
-ljansson \
|
||||||
-lgnunetutil
|
-lgnunetutil
|
||||||
|
|
||||||
perf_mintdb_SOURCES = \
|
perf_taler_mintdb_SOURCES = \
|
||||||
perf_taler_mintdb.c \
|
perf_taler_mintdb.c \
|
||||||
perf_taler_mintdb_init.c \
|
perf_taler_mintdb_init.c \
|
||||||
perf_taler_mintdb_interpreter.c
|
perf_taler_mintdb_interpreter.c
|
||||||
|
perf_taler_mintdb_LDADD = \
|
||||||
perf_mintdb_LDADD = \
|
|
||||||
libtalermintdb.la \
|
libtalermintdb.la \
|
||||||
$(top_srcdir)/src/util/libtalerutil.la \
|
$(top_srcdir)/src/util/libtalerutil.la \
|
||||||
$(top_srcdir)/src/pq/libtalerpq.la \
|
$(top_srcdir)/src/pq/libtalerpq.la \
|
||||||
|
@ -20,20 +20,19 @@
|
|||||||
*/
|
*/
|
||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
#include "perf_taler_mintdb_interpreter.h"
|
#include "perf_taler_mintdb_interpreter.h"
|
||||||
#include "perf_taler_mintdb_values.h"
|
|
||||||
|
|
||||||
|
|
||||||
#define PERF_TALER_MINTDB_NB_DENOMINATION_INIT 10
|
#define NB_DENOMINATION_INIT 10
|
||||||
#define PERF_TALER_MINTDB_NB_DENOMINATION_SAVE 10
|
#define NB_DENOMINATION_SAVE 10
|
||||||
|
|
||||||
#define PERF_TALER_MINTDB_NB_RESERVE_INIT 100
|
#define NB_RESERVE_INIT 1000
|
||||||
#define PERF_TALER_MINTDB_NB_RESERVE_SAVE 10
|
#define NB_RESERVE_SAVE 100
|
||||||
|
|
||||||
#define PERF_TALER_MINTDB_NB_DEPOSIT_INIT 100
|
#define NB_DEPOSIT_INIT 1000
|
||||||
#define PERF_TALER_MINTDB_NB_DEPOSIT_SAVE 10
|
#define NB_DEPOSIT_SAVE 100
|
||||||
|
|
||||||
#define PERF_TALER_MINTDB_NB_WITHDRAW_INIT 100
|
#define NB_WITHDRAW_INIT 1000
|
||||||
#define PERF_TALER_MINTDB_NB_WITHDRAW_SAVE 10
|
#define NB_WITHDRAW_SAVE 100
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Runs the performances tests for the mint database
|
* 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_DEBUG ("00 - Start of interpreter"),
|
||||||
|
|
||||||
PERF_TALER_MINTDB_INIT_CMD_LOOP ("01 - denomination loop",
|
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_START_TRANSACTION ("01 - start transaction"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_INSERT_DENOMINATION ("01 - denomination"),
|
PERF_TALER_MINTDB_INIT_CMD_INSERT_DENOMINATION ("01 - denomination"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_COMMIT_TRANSACTION ("01 - commit transaction"),
|
PERF_TALER_MINTDB_INIT_CMD_COMMIT_TRANSACTION ("01 - commit transaction"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_SAVE_ARRAY ("01 - save denomination",
|
PERF_TALER_MINTDB_INIT_CMD_SAVE_ARRAY ("01 - save denomination",
|
||||||
"01 - denomination loop",
|
"01 - denomination loop",
|
||||||
"01 - denomination",
|
"01 - denomination",
|
||||||
PERF_TALER_MINTDB_NB_DENOMINATION_SAVE),
|
NB_DENOMINATION_SAVE),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("01 - denomination loop end",
|
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("01 - denomination loop end",
|
||||||
"01 - denomination loop"),
|
"01 - denomination loop"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_DEBUG ("01 - init denomination complete"),
|
PERF_TALER_MINTDB_INIT_CMD_DEBUG ("01 - init denomination complete"),
|
||||||
// End of initialization
|
// End of initialization
|
||||||
// Reserve initialization
|
// Reserve initialization
|
||||||
PERF_TALER_MINTDB_INIT_CMD_LOOP ("02 - init reserve loop",
|
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_INSERT_RESERVE ("02 - reserve"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_SAVE_ARRAY ("02 - save reserve",
|
PERF_TALER_MINTDB_INIT_CMD_SAVE_ARRAY ("02 - save reserve",
|
||||||
"02 - init reserve loop",
|
"02 - init reserve loop",
|
||||||
"02 - reserve",
|
"02 - reserve",
|
||||||
PERF_TALER_MINTDB_NB_RESERVE_SAVE),
|
NB_RESERVE_SAVE),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("02 - init reserve end loop",
|
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("02 - init reserve end loop",
|
||||||
"02 - init reserve loop"),
|
"02 - init reserve loop"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_DEBUG ("02 - reserve init complete"),
|
PERF_TALER_MINTDB_INIT_CMD_DEBUG ("02 - reserve init complete"),
|
||||||
// End reserve init
|
// End reserve init
|
||||||
// Withdrawal initialization
|
// Withdrawal initialization
|
||||||
PERF_TALER_MINTDB_INIT_CMD_LOOP ("03 - init withdraw loop",
|
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_START_TRANSACTION ("03 - start transaction"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("03 - denomination load",
|
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("03 - denomination load",
|
||||||
"03 - init withdraw loop",
|
"03 - init withdraw loop",
|
||||||
@ -90,14 +89,14 @@ main (int argc, char ** argv)
|
|||||||
PERF_TALER_MINTDB_INIT_CMD_SAVE_ARRAY ("03 - blindcoin array",
|
PERF_TALER_MINTDB_INIT_CMD_SAVE_ARRAY ("03 - blindcoin array",
|
||||||
"03 - init withdraw loop",
|
"03 - init withdraw loop",
|
||||||
"03 - withdraw",
|
"03 - withdraw",
|
||||||
PERF_TALER_MINTDB_NB_WITHDRAW_SAVE),
|
NB_WITHDRAW_SAVE),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("03 - withdraw init end loop",
|
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("03 - withdraw init end loop",
|
||||||
"03 - init withdraw loop"),
|
"03 - init withdraw loop"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_DEBUG ("03 - withdraw init complete"),
|
PERF_TALER_MINTDB_INIT_CMD_DEBUG ("03 - withdraw init complete"),
|
||||||
//End of withdrawal initialization
|
//End of withdrawal initialization
|
||||||
//Deposit initialization
|
//Deposit initialization
|
||||||
PERF_TALER_MINTDB_INIT_CMD_LOOP ("04 - deposit init loop",
|
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_START_TRANSACTION ("04 - start transaction"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("04 - denomination load",
|
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("04 - denomination load",
|
||||||
"04 - deposit init loop",
|
"04 - deposit init loop",
|
||||||
@ -108,7 +107,7 @@ main (int argc, char ** argv)
|
|||||||
PERF_TALER_MINTDB_INIT_CMD_SAVE_ARRAY ("04 - deposit array",
|
PERF_TALER_MINTDB_INIT_CMD_SAVE_ARRAY ("04 - deposit array",
|
||||||
"04 - deposit init loop",
|
"04 - deposit init loop",
|
||||||
"04 - deposit",
|
"04 - deposit",
|
||||||
PERF_TALER_MINTDB_NB_DEPOSIT_SAVE),
|
NB_DEPOSIT_SAVE),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("04 - deposit init loop end",
|
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("04 - deposit init loop end",
|
||||||
"04 - deposit init loop"),
|
"04 - deposit init loop"),
|
||||||
PERF_TALER_MINTDB_INIT_CMD_DEBUG ("04 - deposit init complete"),
|
PERF_TALER_MINTDB_INIT_CMD_DEBUG ("04 - deposit init complete"),
|
||||||
|
@ -111,11 +111,12 @@
|
|||||||
* Commits the duration between @a _label_start and @a _label_stop
|
* Commits the duration between @a _label_start and @a _label_stop
|
||||||
* to Gauger with @a _description explaining what was measured.
|
* 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_start label of the start of the measurment
|
||||||
* @param _label_stop label of the end of the measurment
|
* @param _label_stop label of the end of the measurment
|
||||||
* @param _description description of the measure displayed in Gauger
|
* @param _description description of the measure displayed in Gauger
|
||||||
* @param _unit the unit of the data measured, typicly something/sec
|
* @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) \
|
#define PERF_TALER_MINTDB_INIT_CMD_GAUGER(_label, _label_start, _label_stop, _description, _unit, _divide) \
|
||||||
{ \
|
{ \
|
||||||
|
@ -132,7 +132,7 @@ main (int argc, char ** argv)
|
|||||||
init,
|
init,
|
||||||
benchmark);
|
benchmark);
|
||||||
|
|
||||||
if (GNUNET_SYSERR != ret)
|
if (GNUNET_SYSERR == ret)
|
||||||
return 1;
|
return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user