diff options
author | Florian Dold <florian@dold.me> | 2022-01-11 21:00:12 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2022-01-11 22:15:56 +0100 |
commit | a74cdf05295764258fe9e7f66f73a442a9b46697 (patch) | |
tree | d1a662fede130abc1fa33cdbc96c081cc47b23cd /packages/taler-wallet-cli | |
parent | a05e891d6e1468fdd99f710301e286857a46aea3 (diff) |
fix DB indexing issues
Diffstat (limited to 'packages/taler-wallet-cli')
-rw-r--r-- | packages/taler-wallet-cli/src/bench1.ts | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/packages/taler-wallet-cli/src/bench1.ts b/packages/taler-wallet-cli/src/bench1.ts index 1a6a26b6b..c7e570b49 100644 --- a/packages/taler-wallet-cli/src/bench1.ts +++ b/packages/taler-wallet-cli/src/bench1.ts @@ -22,13 +22,15 @@ import { codecForNumber, codecForString, codecOptional, + j2s, Logger, } from "@gnu-taler/taler-util"; import { - getDefaultNodeWallet, + getDefaultNodeWallet2, NodeHttpLib, WalletApiOperation, Wallet, + AccessStats, } from "@gnu-taler/taler-wallet-core"; /** @@ -64,6 +66,7 @@ export async function runBench1(configJson: any): Promise<void> { } let wallet = {} as Wallet; + let getDbStats: () => AccessStats; for (let i = 0; i < numIter; i++) { // Create a new wallet in each iteration @@ -72,12 +75,16 @@ export async function runBench1(configJson: any): Promise<void> { if (i % restartWallet == 0) { if (Object.keys(wallet).length !== 0) { wallet.stop(); + console.log("wallet DB stats", j2s(getDbStats!())); } - wallet = await getDefaultNodeWallet({ + + const res = await getDefaultNodeWallet2({ // No persistent DB storage. persistentStoragePath: undefined, httpLib: myHttpLib, }); + wallet = res.wallet; + getDbStats = res.getDbStats; if (trustExchange) { wallet.setInsecureTrustExchange(); } @@ -119,6 +126,7 @@ export async function runBench1(configJson: any): Promise<void> { } wallet.stop(); + console.log("wallet DB stats", j2s(getDbStats!())); } /** |