summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-cli/src/bench1.ts
diff options
context:
space:
mode:
authorBoss Marco <bossm8@bfh.ch>2021-11-05 16:57:32 +0100
committerBoss Marco <bossm8@bfh.ch>2021-11-05 16:57:32 +0100
commit98064f0652d8e1dff661e3bb0d8791f4af04ad6f (patch)
tree5d278fd1fab17b0c4b03cc89bcea678edd3789d3 /packages/taler-wallet-cli/src/bench1.ts
parent8d9386ac008e9d095867433bfc789d09bd93414d (diff)
parent842cc327541ebcfc761208f42bf5f74e22c6283c (diff)
downloadwallet-core-98064f0652d8e1dff661e3bb0d8791f4af04ad6f.tar.gz
wallet-core-98064f0652d8e1dff661e3bb0d8791f4af04ad6f.tar.bz2
wallet-core-98064f0652d8e1dff661e3bb0d8791f4af04ad6f.zip
added some logging messages
Diffstat (limited to 'packages/taler-wallet-cli/src/bench1.ts')
-rw-r--r--packages/taler-wallet-cli/src/bench1.ts14
1 files changed, 13 insertions, 1 deletions
diff --git a/packages/taler-wallet-cli/src/bench1.ts b/packages/taler-wallet-cli/src/bench1.ts
index 448dc913d..3d4561097 100644
--- a/packages/taler-wallet-cli/src/bench1.ts
+++ b/packages/taler-wallet-cli/src/bench1.ts
@@ -22,6 +22,7 @@ import {
codecForNumber,
codecForString,
codecOptional,
+ Logger,
} from "@gnu-taler/taler-util";
import {
getDefaultNodeWallet,
@@ -36,6 +37,9 @@ import {
* set up its own services.
*/
export async function runBench1(configJson: any): Promise<void> {
+
+ const logger = new Logger("Bench1");
+
// Validate the configuration file for this benchmark.
const b1conf = codecForBench1Config().decode(configJson);
@@ -47,8 +51,9 @@ export async function runBench1(configJson: any): Promise<void> {
const withdrawAmount = (numDeposits + 1) * 10;
+ logger.info(`Starting Benchmark with ${numIter} Iterations`);
+
for (let i = 0; i < numIter; i++) {
-
// Create a new wallet in each iteration
// otherwise the TPS go down
// my assumption is that the in-memory db file gets too large
@@ -59,6 +64,8 @@ export async function runBench1(configJson: any): Promise<void> {
});
await wallet.client.call(WalletApiOperation.InitWallet, {});
+ logger.info(`Starting withdrawal of ${withdrawAmount} ${b1conf.currency}`);
+
await wallet.client.call(WalletApiOperation.WithdrawFakebank, {
amount: b1conf.currency + ":" + withdrawAmount,
bank: b1conf.bank,
@@ -69,7 +76,11 @@ export async function runBench1(configJson: any): Promise<void> {
stopWhenDone: true,
});
+ logger.info(`Finished withdrawal`);
+
for (let i = 0; i < numDeposits; i++) {
+
+ logger.info(`Starting deposit of 10 ${b1conf.currency}`);
await wallet.client.call(WalletApiOperation.CreateDepositGroup, {
amount: b1conf.currency + ":10",
depositPaytoUri: b1conf.payto,
@@ -78,6 +89,7 @@ export async function runBench1(configJson: any): Promise<void> {
await wallet.runTaskLoop({
stopWhenDone: true,
});
+ logger.info(`Deposit succesful`);
}
wallet.stop();