aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-cli
diff options
context:
space:
mode:
authorBoss Marco <bossm8@bfh.ch>2021-11-03 16:20:55 +0100
committerBoss Marco <bossm8@bfh.ch>2021-11-03 16:20:55 +0100
commit8d9386ac008e9d095867433bfc789d09bd93414d (patch)
tree86d64808118ee10cd98e3c779dc2efa700b0eb3f /packages/taler-wallet-cli
parentdce86113b1c1863435e2970e1cf2f03f377ab5f4 (diff)
start a new wallet for each iteration
Diffstat (limited to 'packages/taler-wallet-cli')
-rw-r--r--packages/taler-wallet-cli/src/bench1.ts21
1 files changed, 13 insertions, 8 deletions
diff --git a/packages/taler-wallet-cli/src/bench1.ts b/packages/taler-wallet-cli/src/bench1.ts
index 6a1e0d915..448dc913d 100644
--- a/packages/taler-wallet-cli/src/bench1.ts
+++ b/packages/taler-wallet-cli/src/bench1.ts
@@ -41,12 +41,6 @@ export async function runBench1(configJson: any): Promise<void> {
const myHttpLib = new NodeHttpLib();
myHttpLib.setThrottling(false);
- const wallet = await getDefaultNodeWallet({
- // No persistent DB storage.
- persistentStoragePath: undefined,
- httpLib: myHttpLib,
- });
- await wallet.client.call(WalletApiOperation.InitWallet, {});
const numIter = b1conf.iterations ?? 1;
const numDeposits = b1conf.deposits ?? 5;
@@ -54,6 +48,17 @@ export async function runBench1(configJson: any): Promise<void> {
const withdrawAmount = (numDeposits + 1) * 10;
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
+ const wallet = await getDefaultNodeWallet({
+ // No persistent DB storage.
+ persistentStoragePath: undefined,
+ httpLib: myHttpLib,
+ });
+ await wallet.client.call(WalletApiOperation.InitWallet, {});
+
await wallet.client.call(WalletApiOperation.WithdrawFakebank, {
amount: b1conf.currency + ":" + withdrawAmount,
bank: b1conf.bank,
@@ -74,9 +79,9 @@ export async function runBench1(configJson: any): Promise<void> {
stopWhenDone: true,
});
}
- }
- wallet.stop();
+ wallet.stop();
+ }
}
/**