2015-06-09 17:35:33 +02:00
|
|
|
/*
|
|
|
|
This file is part of TALER
|
|
|
|
Copyright (C) 2014, 2015 Christian Grothoff (and other contributing authors)
|
|
|
|
|
|
|
|
TALER is free software; you can redistribute it and/or modify it under the
|
|
|
|
terms of the GNU General Public License as published by the Free Software
|
|
|
|
Foundation; either version 3, or (at your option) any later version.
|
|
|
|
|
|
|
|
TALER is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
|
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License along with
|
|
|
|
TALER; see the file COPYING. If not, If not, see <http://www.gnu.org/licenses/>
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* @file mintdb/perf_taler_mintdb.c
|
|
|
|
* @brief Mint database performance analysis
|
|
|
|
* @author Nicolas Fournier
|
|
|
|
*/
|
2015-06-12 11:14:32 +02:00
|
|
|
#include "platform.h"
|
2015-06-09 13:03:37 +02:00
|
|
|
#include "perf_taler_mintdb_interpreter.h"
|
|
|
|
|
2015-07-01 18:14:28 +02:00
|
|
|
|
2015-07-20 10:42:26 +02:00
|
|
|
#define NB_DENOMINATION_INIT 15
|
|
|
|
#define NB_DENOMINATION_SAVE 15
|
2015-07-01 18:14:28 +02:00
|
|
|
|
2015-08-25 18:28:54 +02:00
|
|
|
#define SMALL 1000
|
|
|
|
#define BIG 10000
|
|
|
|
#define BIGGER 100000
|
2015-07-01 18:14:28 +02:00
|
|
|
|
2015-08-06 17:19:11 +02:00
|
|
|
#define NB_RESERVE_INIT BIGGER
|
|
|
|
#define NB_RESERVE_SAVE BIG
|
2015-07-01 18:14:28 +02:00
|
|
|
|
2015-08-06 17:19:11 +02:00
|
|
|
#define NB_DEPOSIT_INIT BIGGER
|
|
|
|
#define NB_DEPOSIT_SAVE BIG
|
|
|
|
|
|
|
|
#define NB_WITHDRAW_INIT BIGGER
|
|
|
|
#define NB_WITHDRAW_SAVE BIG
|
2015-07-01 18:14:28 +02:00
|
|
|
|
2015-08-10 18:12:27 +02:00
|
|
|
#define NB_REFRESH_INIT BIGGER
|
|
|
|
#define NB_REFRESH_SAVE BIG
|
|
|
|
|
2015-08-13 09:22:38 +02:00
|
|
|
#define NB_MELT_INIT BIG
|
|
|
|
#define NB_MELT_SAVE SMALL
|
|
|
|
|
2015-06-09 17:35:33 +02:00
|
|
|
/**
|
|
|
|
* Runs the performances tests for the mint database
|
2015-06-11 15:55:46 +02:00
|
|
|
* and logs the results using Gauger
|
2015-06-09 17:35:33 +02:00
|
|
|
*/
|
2015-06-09 13:03:37 +02:00
|
|
|
int
|
2015-06-11 15:55:46 +02:00
|
|
|
main (int argc, char ** argv)
|
2015-06-09 13:03:37 +02:00
|
|
|
{
|
2015-07-01 18:14:28 +02:00
|
|
|
int ret;
|
|
|
|
struct PERF_TALER_MINTDB_Cmd benchmark[] =
|
2015-06-11 15:55:46 +02:00
|
|
|
{
|
2015-08-11 15:52:40 +02:00
|
|
|
/* Denomination used to create coins */
|
2015-07-07 12:57:14 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_DEBUG ("Initializing database"),
|
2015-06-30 14:01:06 +02:00
|
|
|
|
2015-06-30 09:23:04 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_LOOP ("01 - denomination loop",
|
2015-07-06 15:54:48 +02:00
|
|
|
NB_DENOMINATION_INIT),
|
2015-07-07 12:57:14 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_START_TRANSACTION (""),
|
2015-08-10 15:11:02 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_CREATE_DENOMINATION ("01 - denomination"),
|
|
|
|
PERF_TALER_MINTDB_INIT_CMD_INSERT_DENOMINATION ("01 - insert",
|
|
|
|
"01 - denomination"),
|
2015-07-07 12:57:14 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_COMMIT_TRANSACTION (""),
|
2015-06-30 09:23:04 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_SAVE_ARRAY ("01 - save denomination",
|
|
|
|
"01 - denomination loop",
|
|
|
|
"01 - denomination",
|
2015-07-06 15:54:48 +02:00
|
|
|
NB_DENOMINATION_SAVE),
|
2015-08-10 15:11:02 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("01 - end",
|
2015-06-30 09:23:04 +02:00
|
|
|
"01 - denomination loop"),
|
2015-08-11 15:52:40 +02:00
|
|
|
/* End of initialization */
|
|
|
|
/* Reserve initialization */
|
2015-06-30 09:23:04 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_LOOP ("02 - init reserve loop",
|
2015-07-06 15:54:48 +02:00
|
|
|
NB_RESERVE_INIT),
|
2015-08-10 15:11:02 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_CREATE_RESERVE ("02 - reserve"),
|
|
|
|
PERF_TALER_MINTDB_INIT_CMD_INSERT_RESERVE ("02 - insert",
|
|
|
|
"02 - reserve"),
|
2015-06-30 09:23:04 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_SAVE_ARRAY ("02 - save reserve",
|
|
|
|
"02 - init reserve loop",
|
|
|
|
"02 - reserve",
|
2015-07-06 15:54:48 +02:00
|
|
|
NB_RESERVE_SAVE),
|
2015-08-10 15:11:02 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("02 - end",
|
2015-06-30 09:23:04 +02:00
|
|
|
"02 - init reserve loop"),
|
2015-08-11 15:52:40 +02:00
|
|
|
/* End reserve init */
|
|
|
|
/* Withdrawal initialization */
|
2015-06-30 09:23:04 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_LOOP ("03 - init withdraw loop",
|
2015-07-06 15:54:48 +02:00
|
|
|
NB_WITHDRAW_INIT),
|
2015-07-07 12:57:14 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_START_TRANSACTION (""),
|
2015-06-30 09:23:04 +02:00
|
|
|
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"),
|
2015-08-10 15:11:02 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_CREATE_WITHDRAW ("03 - withdraw",
|
2015-06-30 09:23:04 +02:00
|
|
|
"03 - denomination load",
|
|
|
|
"03 - reserve load"),
|
2015-08-10 15:11:02 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_INSERT_WITHDRAW ("03 - insert",
|
|
|
|
"03 - withdraw"),
|
2015-07-07 12:57:14 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_COMMIT_TRANSACTION (""),
|
2015-07-16 17:21:25 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_SAVE_ARRAY ("03 - save coin",
|
2015-06-30 09:23:04 +02:00
|
|
|
"03 - init withdraw loop",
|
|
|
|
"03 - withdraw",
|
2015-07-06 15:54:48 +02:00
|
|
|
NB_WITHDRAW_SAVE),
|
2015-08-10 15:11:02 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("03 - end",
|
2015-06-30 09:23:04 +02:00
|
|
|
"03 - init withdraw loop"),
|
2015-08-11 15:52:40 +02:00
|
|
|
/*End of withdrawal initialization */
|
|
|
|
/*Deposit initialization */
|
2015-06-30 09:23:04 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_LOOP ("04 - deposit init loop",
|
2015-07-06 15:54:48 +02:00
|
|
|
NB_DEPOSIT_INIT),
|
2015-07-07 12:57:14 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_START_TRANSACTION (""),
|
2015-07-16 17:21:25 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("04 - coin load",
|
2015-06-30 18:18:31 +02:00
|
|
|
"04 - deposit init loop",
|
2015-07-16 17:21:25 +02:00
|
|
|
"03 - save coin"),
|
2015-08-10 15:11:02 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_CREATE_DEPOSIT ("04 - deposit",
|
2015-07-16 17:21:25 +02:00
|
|
|
"04 - coin load"),
|
2015-08-10 15:11:02 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_INSERT_DEPOSIT ("04 - insert",
|
|
|
|
"04 - deposit"),
|
2015-07-07 12:57:14 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_COMMIT_TRANSACTION (""),
|
2015-06-30 09:23:04 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_SAVE_ARRAY ("04 - deposit array",
|
|
|
|
"04 - deposit init loop",
|
|
|
|
"04 - deposit",
|
2015-07-06 15:54:48 +02:00
|
|
|
NB_DEPOSIT_SAVE),
|
2015-07-07 12:57:14 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("",
|
2015-06-30 09:23:04 +02:00
|
|
|
"04 - deposit init loop"),
|
2015-08-11 15:52:40 +02:00
|
|
|
/* End of deposit initialization */
|
|
|
|
/* Session initialization */
|
2015-08-10 18:12:27 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_LOOP ("05 - refresh session init loop",
|
|
|
|
NB_REFRESH_INIT),
|
|
|
|
PERF_TALER_MINTDB_INIT_CMD_START_TRANSACTION (""),
|
|
|
|
PERF_TALER_MINTDB_INIT_CMD_CREATE_REFRESH_SESSION ("05 - refresh session"),
|
|
|
|
PERF_TALER_MINTDB_INIT_CMD_SAVE_ARRAY ("05 - session array",
|
|
|
|
"05 - refresh session init loop",
|
|
|
|
"05 - refresh session",
|
|
|
|
NB_RESERVE_SAVE),
|
|
|
|
PERF_TALER_MINTDB_INIT_CMD_COMMIT_TRANSACTION (""),
|
|
|
|
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("05 - end",
|
|
|
|
"05 - refresh session init loop"),
|
2015-08-11 15:52:40 +02:00
|
|
|
/* End of refresh session initialization */
|
|
|
|
/* Refresh melt initialization */
|
|
|
|
PERF_TALER_MINTDB_INIT_CMD_LOOP ("06 - refresh melt init loop",
|
2015-08-13 09:22:38 +02:00
|
|
|
NB_MELT_INIT),
|
2015-08-11 15:52:40 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_START_TRANSACTION (""),
|
2015-08-17 10:56:56 +02:00
|
|
|
/* TODO: initialize using coins & sessions created localy
|
|
|
|
* in order to make sure the same coin are not melted twice*/
|
2015-08-11 15:52:40 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("06 - session hash",
|
|
|
|
"06 - refresh melt init loop",
|
|
|
|
"05 - session array"),
|
|
|
|
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("06 - coin",
|
|
|
|
"06 - refresh melt init loop",
|
|
|
|
"03 - save coin"),
|
|
|
|
PERF_TALER_MINTDB_INIT_CMD_INSERT_REFRESH_MELT ("06 - refresh melt",
|
|
|
|
"06 - session hash",
|
|
|
|
"06 - coin"),
|
|
|
|
PERF_TALER_MINTDB_INIT_CMD_COMMIT_TRANSACTION (""),
|
|
|
|
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("06 - end",
|
|
|
|
"06 - refresh melt init loop"),
|
|
|
|
/* End of refresh melt initialization */
|
2015-08-10 18:12:27 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_DEBUG ("End of initialization"),
|
2015-07-28 14:07:12 +02:00
|
|
|
|
2015-07-20 10:42:26 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_DEBUG ("Start of performances measuring"),
|
2015-08-13 09:22:38 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("21 - start"),
|
|
|
|
PERF_TALER_MINTDB_INIT_CMD_LOOP ("21 - reserve insert measure",
|
2015-07-20 10:42:26 +02:00
|
|
|
NB_RESERVE_SAVE),
|
2015-08-13 09:22:38 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_CREATE_RESERVE ("21 - reserve"),
|
|
|
|
PERF_TALER_MINTDB_INIT_CMD_INSERT_RESERVE ("21 - insert",
|
|
|
|
"21 - reserve"),
|
2015-07-07 12:57:14 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("",
|
2015-08-13 09:22:38 +02:00
|
|
|
"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",
|
2015-07-27 15:56:01 +02:00
|
|
|
"POSTGRES",
|
2015-07-20 10:42:26 +02:00
|
|
|
"Number of reserve inserted per second",
|
|
|
|
"item/sec",
|
|
|
|
NB_RESERVE_SAVE),
|
|
|
|
PERF_TALER_MINTDB_INIT_CMD_DEBUG ("End of reserve insertion"),
|
|
|
|
|
2015-08-13 09:22:38 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("22 - start"),
|
|
|
|
PERF_TALER_MINTDB_INIT_CMD_LOOP ("22 - reserve load measure",
|
2015-07-20 10:42:26 +02:00
|
|
|
NB_RESERVE_SAVE),
|
2015-08-13 09:22:38 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("22 - reserve",
|
|
|
|
"22 - reserve load measure",
|
2015-07-20 10:42:26 +02:00
|
|
|
"02 - save reserve"),
|
2015-08-13 09:22:38 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_GET_RESERVE ("22 - get",
|
|
|
|
"22 - reserve"),
|
2015-07-20 10:42:26 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("",
|
2015-08-13 09:22:38 +02:00
|
|
|
"22 - reserve load measure"),
|
|
|
|
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("22 - stop"),
|
2015-07-20 10:42:26 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_GAUGER ("",
|
2015-08-13 09:22:38 +02:00
|
|
|
"22 - start",
|
|
|
|
"22 - stop",
|
2015-07-27 15:56:01 +02:00
|
|
|
"POSTGRES",
|
2015-07-20 10:42:26 +02:00
|
|
|
"Number of reserve loaded per second",
|
|
|
|
"item/sec",
|
|
|
|
NB_RESERVE_SAVE),
|
|
|
|
PERF_TALER_MINTDB_INIT_CMD_DEBUG ("End of reserve retreival"),
|
|
|
|
|
2015-08-13 09:22:38 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("23 - start"),
|
|
|
|
PERF_TALER_MINTDB_INIT_CMD_LOOP ("23 - reserve history measure",
|
2015-07-20 10:42:26 +02:00
|
|
|
NB_RESERVE_SAVE),
|
2015-08-13 09:22:38 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("23 - reserve",
|
|
|
|
"23 - reserve history measure",
|
2015-07-20 10:42:26 +02:00
|
|
|
"02 - save reserve"),
|
|
|
|
PERF_TALER_MINTDB_INIT_CMD_GET_RESERVE_HISTORY ("",
|
2015-08-13 09:22:38 +02:00
|
|
|
"23 - reserve"),
|
2015-07-20 10:42:26 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("",
|
2015-08-13 09:22:38 +02:00
|
|
|
"23 - reserve history measure"),
|
|
|
|
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("23 - stop"),
|
2015-07-20 10:42:26 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_GAUGER ("",
|
2015-08-13 09:22:38 +02:00
|
|
|
"23 - start",
|
|
|
|
"23 - stop",
|
2015-07-27 15:56:01 +02:00
|
|
|
"POSTGRES",
|
2015-07-20 10:42:26 +02:00
|
|
|
"Number of reserve history loaded per second",
|
|
|
|
"item/sec",
|
|
|
|
NB_RESERVE_SAVE),
|
|
|
|
PERF_TALER_MINTDB_INIT_CMD_DEBUG ("End of reserve history access"),
|
|
|
|
|
|
|
|
|
2015-08-13 09:22:38 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("24 - start"),
|
|
|
|
PERF_TALER_MINTDB_INIT_CMD_LOOP ("24 - withdraw insert measure",
|
2015-07-20 10:42:26 +02:00
|
|
|
NB_WITHDRAW_SAVE),
|
2015-08-13 09:22:38 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("24 - reserve",
|
|
|
|
"24 - withdraw insert measure",
|
2015-07-20 10:42:26 +02:00
|
|
|
"02 - save reserve"),
|
2015-08-13 09:22:38 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("24 - denomination",
|
|
|
|
"24 - withdraw insert measure",
|
2015-07-20 10:42:26 +02:00
|
|
|
"01 - save denomination"),
|
2015-08-13 09:22:38 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_CREATE_WITHDRAW ("24 - withdraw",
|
|
|
|
"24 - denomination",
|
|
|
|
"24 - reserve"),
|
|
|
|
PERF_TALER_MINTDB_INIT_CMD_INSERT_WITHDRAW ("24 - insert",
|
|
|
|
"24 - withdraw"),
|
2015-07-20 10:42:26 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("",
|
2015-08-13 09:22:38 +02:00
|
|
|
"24 - withdraw insert measure"),
|
|
|
|
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("24 - stop"),
|
2015-07-20 10:42:26 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_GAUGER ("",
|
2015-08-13 09:22:38 +02:00
|
|
|
"24 - start",
|
|
|
|
"24 - stop",
|
2015-07-27 15:56:01 +02:00
|
|
|
"POSTGRES",
|
2015-07-20 10:42:26 +02:00
|
|
|
"Number of withdraw insert per second",
|
|
|
|
"item/sec",
|
|
|
|
NB_WITHDRAW_SAVE),
|
|
|
|
PERF_TALER_MINTDB_INIT_CMD_DEBUG ("End of withdraw insertion"),
|
|
|
|
|
2015-08-13 09:22:38 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("25 - start"),
|
|
|
|
PERF_TALER_MINTDB_INIT_CMD_LOOP ("25 - withdraw insert measure",
|
2015-07-20 10:42:26 +02:00
|
|
|
NB_RESERVE_SAVE),
|
2015-08-13 09:22:38 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("25 - coin",
|
|
|
|
"25 - withdraw insert measure",
|
2015-07-31 17:17:29 +02:00
|
|
|
"03 - save coin"),
|
|
|
|
PERF_TALER_MINTDB_INIT_CMD_GET_WITHDRAW ("",
|
2015-08-13 09:22:38 +02:00
|
|
|
"25 - coin"),
|
2015-07-20 10:42:26 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("",
|
2015-08-13 09:22:38 +02:00
|
|
|
"25 - withdraw insert measure"),
|
|
|
|
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("25 - stop"),
|
2015-07-20 10:42:26 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_GAUGER ("",
|
2015-08-13 09:22:38 +02:00
|
|
|
"25 - start",
|
|
|
|
"25 - stop",
|
2015-07-27 15:56:01 +02:00
|
|
|
"POSTGRES",
|
2015-07-20 14:07:02 +02:00
|
|
|
"Number of withdraw loaded per second",
|
2015-07-20 10:42:26 +02:00
|
|
|
"item/sec",
|
|
|
|
NB_RESERVE_SAVE),
|
|
|
|
PERF_TALER_MINTDB_INIT_CMD_DEBUG ("End of withdraw loading"),
|
|
|
|
|
2015-08-13 09:22:38 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("26 - start"),
|
|
|
|
PERF_TALER_MINTDB_INIT_CMD_LOOP ("26 - get coin transaction",
|
2015-07-27 15:56:01 +02:00
|
|
|
NB_WITHDRAW_SAVE),
|
2015-08-13 09:22:38 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("26 - coin",
|
|
|
|
"26 - get coin transaction",
|
2015-07-27 15:56:01 +02:00
|
|
|
"03 - save coin"),
|
|
|
|
PERF_TALER_MINTDB_INIT_CMD_GET_COIN_TRANSACTION("",
|
2015-08-13 09:22:38 +02:00
|
|
|
"26 - coin"),
|
2015-07-27 15:56:01 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("",
|
2015-08-13 09:22:38 +02:00
|
|
|
"26 - get coin transaction"),
|
|
|
|
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("26 - end"),
|
2015-07-27 15:56:01 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_GAUGER ("",
|
2015-08-13 09:22:38 +02:00
|
|
|
"26 - start",
|
|
|
|
"26 - end",
|
2015-07-27 15:56:01 +02:00
|
|
|
"POSTGRES",
|
|
|
|
"Number of coin transaction history loaded per second",
|
|
|
|
"item/sec",
|
|
|
|
NB_WITHDRAW_SAVE),
|
|
|
|
PERF_TALER_MINTDB_INIT_CMD_DEBUG ("End of transaction loading"),
|
2015-07-28 14:07:12 +02:00
|
|
|
|
2015-08-13 09:22:38 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("27 - start"),
|
2015-09-19 22:08:49 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_LOOP ("27 - /reserve/withdraw",
|
2015-07-27 15:56:01 +02:00
|
|
|
NB_WITHDRAW_SAVE),
|
2015-08-13 09:22:38 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("27 - reserve",
|
2015-09-19 22:08:49 +02:00
|
|
|
"27 - /reserve/withdraw",
|
2015-07-27 16:38:05 +02:00
|
|
|
"02 - save reserve"),
|
2015-08-13 09:22:38 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("27 - dki",
|
2015-09-19 22:08:49 +02:00
|
|
|
"27 - /reserve/withdraw",
|
2015-07-27 16:38:05 +02:00
|
|
|
"01 - save denomination"),
|
2015-07-27 15:56:01 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_WITHDRAW_SIGN ("",
|
2015-08-13 09:22:38 +02:00
|
|
|
"27 - dki",
|
|
|
|
"27 - reserve"),
|
2015-07-27 15:56:01 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("",
|
2015-09-19 22:08:49 +02:00
|
|
|
"27 - /reserve/withdraw"),
|
2015-08-13 09:22:38 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("27 - end"),
|
2015-07-27 15:56:01 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_GAUGER ("",
|
2015-08-13 09:22:38 +02:00
|
|
|
"27 - start",
|
|
|
|
"27 - end",
|
2015-07-27 15:56:01 +02:00
|
|
|
"POSTGRES",
|
2015-09-19 22:08:49 +02:00
|
|
|
"Number of /reserve/withdraw per second",
|
2015-07-27 15:56:01 +02:00
|
|
|
"item/sec",
|
|
|
|
NB_WITHDRAW_SAVE),
|
2015-09-19 22:08:49 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_DEBUG ("End of /reserve/withdraw"),
|
2015-08-06 17:19:11 +02:00
|
|
|
|
2015-08-13 09:22:38 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("28 - start"),
|
|
|
|
PERF_TALER_MINTDB_INIT_CMD_LOOP ("28 - /deposit",
|
2015-08-03 10:26:52 +02:00
|
|
|
NB_DEPOSIT_SAVE),
|
2015-08-13 09:22:38 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("28 - coin",
|
|
|
|
"28 - /deposit",
|
2015-08-03 10:26:52 +02:00
|
|
|
"03 - save coin"),
|
2015-08-13 09:22:38 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_DEPOSIT ("28 - deposit",
|
|
|
|
"28 - coin"),
|
2015-08-03 10:26:52 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("",
|
2015-08-13 09:22:38 +02:00
|
|
|
"28 - /deposit"),
|
|
|
|
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("28 - stop"),
|
2015-08-03 10:26:52 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_GAUGER ("",
|
2015-08-13 09:22:38 +02:00
|
|
|
"28 - start",
|
|
|
|
"28 - stop",
|
2015-08-03 10:26:52 +02:00
|
|
|
"POSTGRES",
|
|
|
|
"Number of /deposit per second",
|
|
|
|
"item/sec",
|
|
|
|
NB_DEPOSIT_SAVE),
|
2015-08-13 09:22:38 +02:00
|
|
|
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),
|
2015-07-07 12:57:14 +02:00
|
|
|
PERF_TALER_MINTDB_INIT_CMD_END (""),
|
2015-06-11 15:55:46 +02:00
|
|
|
};
|
2015-07-28 14:07:12 +02:00
|
|
|
|
2015-07-20 10:42:26 +02:00
|
|
|
ret = PERF_TALER_MINTDB_run_benchmark (
|
|
|
|
"perf-taler-mintdb",
|
|
|
|
"./test-mint-db-postgres.conf",
|
|
|
|
(struct PERF_TALER_MINTDB_Cmd []) {PERF_TALER_MINTDB_INIT_CMD_END("")},
|
|
|
|
benchmark);
|
2015-07-06 11:11:43 +02:00
|
|
|
if (GNUNET_SYSERR == ret)
|
|
|
|
return 1;
|
2015-07-01 14:11:54 +02:00
|
|
|
return 0;
|
2015-06-09 13:03:37 +02:00
|
|
|
}
|