Added more performance tests
This commit is contained in:
parent
663fa898f5
commit
f41e533c12
@ -121,7 +121,7 @@ main (int argc, char ** argv)
|
||||
PERF_TALER_MINTDB_INIT_CMD_GAUGER ("",
|
||||
"05 - start",
|
||||
"05 - stop",
|
||||
"MINTDB",
|
||||
"POSTGRES",
|
||||
"Number of reserve inserted per second",
|
||||
"item/sec",
|
||||
NB_RESERVE_SAVE),
|
||||
@ -141,7 +141,7 @@ main (int argc, char ** argv)
|
||||
PERF_TALER_MINTDB_INIT_CMD_GAUGER ("",
|
||||
"06 - start",
|
||||
"06 - stop",
|
||||
"MINTDB",
|
||||
"POSTGRES",
|
||||
"Number of reserve loaded per second",
|
||||
"item/sec",
|
||||
NB_RESERVE_SAVE),
|
||||
@ -161,7 +161,7 @@ main (int argc, char ** argv)
|
||||
PERF_TALER_MINTDB_INIT_CMD_GAUGER ("",
|
||||
"07 - start",
|
||||
"07 - stop",
|
||||
"MINTDB",
|
||||
"POSTGRES",
|
||||
"Number of reserve history loaded per second",
|
||||
"item/sec",
|
||||
NB_RESERVE_SAVE),
|
||||
@ -186,7 +186,7 @@ main (int argc, char ** argv)
|
||||
PERF_TALER_MINTDB_INIT_CMD_GAUGER ("",
|
||||
"08 - start",
|
||||
"08 - stop",
|
||||
"MINTDB",
|
||||
"POSTGRES",
|
||||
"Number of withdraw insert per second",
|
||||
"item/sec",
|
||||
NB_WITHDRAW_SAVE),
|
||||
@ -210,12 +210,55 @@ main (int argc, char ** argv)
|
||||
PERF_TALER_MINTDB_INIT_CMD_GAUGER ("",
|
||||
"09 - start",
|
||||
"09 - stop",
|
||||
"MINTDB",
|
||||
"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",
|
||||
NB_WITHDRAW_SAVE),
|
||||
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("10 - coin",
|
||||
"10 - get coin transaction",
|
||||
"03 - save coin"),
|
||||
PERF_TALER_MINTDB_INIT_CMD_GET_COIN_TRANSACTION("",
|
||||
"10 - coin"),
|
||||
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("",
|
||||
"10 - get coin transaction"),
|
||||
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("10 - end"),
|
||||
PERF_TALER_MINTDB_INIT_CMD_GAUGER ("",
|
||||
"10 - start",
|
||||
"10 - 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",
|
||||
NB_WITHDRAW_SAVE),
|
||||
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("11 - reserve",
|
||||
"11 - /withdraw/sign",
|
||||
"02 - reserve"),
|
||||
PERF_TALER_MINTDB_INIT_CMD_LOAD_ARRAY ("11 - dki",
|
||||
"11 - /withdraw/sign",
|
||||
"01 - denomination"),
|
||||
PERF_TALER_MINTDB_INIT_CMD_WITHDRAW_SIGN ("",
|
||||
"11 - dki",
|
||||
"11 - reserve"),
|
||||
PERF_TALER_MINTDB_INIT_CMD_END_LOOP ("",
|
||||
"11 - get coin transaction"),
|
||||
PERF_TALER_MINTDB_INIT_CMD_GET_TIME ("11 - end"),
|
||||
PERF_TALER_MINTDB_INIT_CMD_GAUGER ("",
|
||||
"11 - start",
|
||||
"11 - 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_END (""),
|
||||
};
|
||||
|
||||
|
@ -567,3 +567,23 @@ PERF_TALER_MINTDB_refresh_melt_free (struct TALER_MINTDB_RefreshMelt *melt)
|
||||
GNUNET_CRYPTO_rsa_signature_free (melt->coin.denom_sig.rsa_signature);
|
||||
return GNUNET_OK;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Create a #TALER_MINTDB_RefreshCommitCoin
|
||||
*/
|
||||
struct TALER_MINTDB_RefreshCommitCoin *
|
||||
PERF_TALER_MINTDB_refresh_commit_coin_init ()
|
||||
{
|
||||
struct TALER_MINTDB_RefreshCommitCoin *commit_coin;
|
||||
struct TALER_RefreshLinkEncrypted *refresh_link;
|
||||
|
||||
commit_coin = GNUNET_new (struct TALER_MINTDB_RefreshCommitCoin);
|
||||
GNUNET_assert (NULL != commit_coin);
|
||||
{/* refresh_link */
|
||||
refresh_link = GNUNET_new (struct TALER_RefreshLinkEncrypted);
|
||||
GNUNET_assert (NULL != refresh_link);
|
||||
}
|
||||
commit_coin->refresh_link = refresh_link;
|
||||
return commit_coin;
|
||||
}
|
||||
|
@ -206,19 +206,6 @@ int
|
||||
PERF_TALER_MINTDB_refresh_melt_free (struct TALER_MINTDB_RefreshMelt *melt);
|
||||
|
||||
|
||||
/**
|
||||
* Generate a random CoinPublicInfo
|
||||
*/
|
||||
struct TALER_CoinPublicInfo *
|
||||
PERF_TALER_MINTDB_coin_public_info_init (void);
|
||||
|
||||
|
||||
/**
|
||||
* Free a CoinPublicInfo
|
||||
*/
|
||||
int PERF_TALER_MINTDB_coin_public_info_free (struct TALER_CoinPublicInfo *cpi);
|
||||
|
||||
|
||||
/**
|
||||
* @return a randomly generated refresh session
|
||||
*/
|
||||
|
@ -470,7 +470,7 @@ interpret (struct PERF_TALER_MINTDB_interpreter_state *state)
|
||||
elapsed = GNUNET_TIME_absolute_get_difference (start,
|
||||
stop);
|
||||
ips = (1.0 * state->cmd[state->i].details.gauger.divide) / (elapsed.rel_value_us/1000000.0);
|
||||
GAUGER ("MINTDB",
|
||||
GAUGER (state->cmd[state->i].details.gauger.category,
|
||||
state->cmd[state->i].details.gauger.description,
|
||||
ips,
|
||||
state->cmd[state->i].details.gauger.unit);
|
||||
@ -741,6 +741,8 @@ interpret (struct PERF_TALER_MINTDB_interpreter_state *state)
|
||||
state->cmd[state->i].details.insert_refresh_melt.label_hash);
|
||||
coin_index = cmd_find (state->cmd,
|
||||
state->cmd[state->i].details.insert_refresh_melt.label_coin);
|
||||
GNUNET_assert (GNUNET_SYSERR != hash_index);
|
||||
GNUNET_assert (GNUNET_SYSERR != coin_index);
|
||||
hash = state->cmd[hash_index].exposed.data.session_hash;
|
||||
coin = state->cmd[coin_index].exposed.data.coin;
|
||||
melt = PERF_TALER_MINTDB_refresh_melt_init (&hash,
|
||||
|
@ -332,7 +332,7 @@
|
||||
.command = PERF_TALER_MINTDB_CMD_GET_COIN_TRANSACTION, \
|
||||
.label = _label, \
|
||||
.exposed.type = PERF_TALER_MINTDB_NONE, \
|
||||
.details.get_coin_trancaction.label_coin = _label_coin \
|
||||
.details.get_coin_transaction.label_coin = _label_coin \
|
||||
}
|
||||
|
||||
|
||||
@ -386,7 +386,7 @@
|
||||
_label_reserve), \
|
||||
PERF_TALER_MINTDB_INIT_CMD_INSERT_WITHDRAW(_label "insert withdraw", \
|
||||
_label_dki, \
|
||||
_label_reserve),
|
||||
_label_reserve)
|
||||
|
||||
|
||||
/**
|
||||
@ -570,6 +570,8 @@ enum PERF_TALER_MINTDB_CMD_Name
|
||||
|
||||
/**
|
||||
* Create a refresh session
|
||||
* The number of melted coins is 1,
|
||||
* The number of minted coins is 1
|
||||
*/
|
||||
PERF_TALER_MINTDB_CMD_CREATE_REFRESH_SESSION,
|
||||
|
||||
@ -946,6 +948,7 @@ union PERF_TALER_MINTDB_CMD_Details
|
||||
* The refresh session hash
|
||||
*/
|
||||
const char *label_hash;
|
||||
|
||||
} insert_refresh_commit_coin;
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user