aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mintdb/perf_taler_mintdb.c53
-rw-r--r--src/mintdb/perf_taler_mintdb_init.c20
-rw-r--r--src/mintdb/perf_taler_mintdb_init.h13
-rw-r--r--src/mintdb/perf_taler_mintdb_interpreter.c4
-rw-r--r--src/mintdb/perf_taler_mintdb_interpreter.h7
5 files changed, 76 insertions, 21 deletions
diff --git a/src/mintdb/perf_taler_mintdb.c b/src/mintdb/perf_taler_mintdb.c
index 6150bb0ce..3b026f283 100644
--- a/src/mintdb/perf_taler_mintdb.c
+++ b/src/mintdb/perf_taler_mintdb.c
@@ -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 (""),
};
diff --git a/src/mintdb/perf_taler_mintdb_init.c b/src/mintdb/perf_taler_mintdb_init.c
index 081875769..a7ee6d85b 100644
--- a/src/mintdb/perf_taler_mintdb_init.c
+++ b/src/mintdb/perf_taler_mintdb_init.c
@@ -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;
+}
diff --git a/src/mintdb/perf_taler_mintdb_init.h b/src/mintdb/perf_taler_mintdb_init.h
index c159770fc..75ba2a821 100644
--- a/src/mintdb/perf_taler_mintdb_init.h
+++ b/src/mintdb/perf_taler_mintdb_init.h
@@ -207,19 +207,6 @@ 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
*/
struct TALER_MINTDB_RefreshSession *
diff --git a/src/mintdb/perf_taler_mintdb_interpreter.c b/src/mintdb/perf_taler_mintdb_interpreter.c
index 87bc1c4c7..6fc283851 100644
--- a/src/mintdb/perf_taler_mintdb_interpreter.c
+++ b/src/mintdb/perf_taler_mintdb_interpreter.c
@@ -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,
diff --git a/src/mintdb/perf_taler_mintdb_interpreter.h b/src/mintdb/perf_taler_mintdb_interpreter.h
index 29398ab2c..08e7ad384 100644
--- a/src/mintdb/perf_taler_mintdb_interpreter.h
+++ b/src/mintdb/perf_taler_mintdb_interpreter.h
@@ -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;
/**