gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-wallet-core] 01/11: update bench1 config


From: gnunet
Subject: [taler-wallet-core] 01/11: update bench1 config
Date: Thu, 18 Nov 2021 13:52:37 +0100

This is an automated email from the git hooks/post-receive script.

marco-boss pushed a commit to branch master
in repository wallet-core.

commit fb23bab6fe38f2e8d71ca51d8210b403d2514e3a
Author: Boss Marco <bossm8@bfh.ch>
AuthorDate: Tue Oct 26 10:50:01 2021 +0200

    update bench1 config
---
 packages/taler-wallet-cli/src/bench1.ts | 33 +++++++++++++++++++++++++--------
 1 file changed, 25 insertions(+), 8 deletions(-)

diff --git a/packages/taler-wallet-cli/src/bench1.ts 
b/packages/taler-wallet-cli/src/bench1.ts
index 4a2651f3..1d836365 100644
--- a/packages/taler-wallet-cli/src/bench1.ts
+++ b/packages/taler-wallet-cli/src/bench1.ts
@@ -48,10 +48,13 @@ export async function runBench1(configJson: any): 
Promise<void> {
   await wallet.client.call(WalletApiOperation.InitWallet, {});
 
   const numIter = b1conf.iterations ?? 1;
+  const numDeposits = b1conf.deposits ?? 5;
+
+  const withdrawAmount = (numDeposits + 1) * 10;
 
   for (let i = 0; i < numIter; i++) {
     await wallet.client.call(WalletApiOperation.WithdrawFakebank, {
-      amount: "TESTKUDOS:10",
+      amount: b1conf.currency + ":" + string(withdrawAmount),
       bank: b1conf.bank,
       exchange: b1conf.exchange,
     });
@@ -60,14 +63,16 @@ export async function runBench1(configJson: any): 
Promise<void> {
       stopWhenDone: true,
     });
 
-    await wallet.client.call(WalletApiOperation.CreateDepositGroup, {
-      amount: "TESTKUDOS:5",
-      depositPaytoUri: "payto://x-taler-bank/localhost/foo",
-    });
+    for (let i = 0; i < numDeposits; i++) {
+      await wallet.client.call(WalletApiOperation.CreateDepositGroup, {
+        amount: b1conf.currency + ":10",
+        depositPaytoUri: b1conf.payto,
+      });
 
-    await wallet.runTaskLoop({
-      stopWhenDone: true,
-    });
+      await wallet.runTaskLoop({
+        stopWhenDone: true,
+      });
+    }
   }
 
   wallet.stop();
@@ -82,6 +87,11 @@ interface Bench1Config {
    */
   bank: string;
 
+  /**
+   * Payto url for deposits.
+   */
+  payto: string;
+
   /**
    * Base URL of the exchange.
    */
@@ -92,6 +102,10 @@ interface Bench1Config {
    * Defaults to 1.
    */
   iterations?: number;
+
+  currency: string;
+
+  deposits?: number;
 }
 
 /**
@@ -100,6 +114,9 @@ interface Bench1Config {
 const codecForBench1Config = () =>
   buildCodecForObject<Bench1Config>()
     .property("bank", codecForString())
+    .property("payto", codecForString())
     .property("exchange", codecForString())
     .property("iterations", codecOptional(codecForNumber()))
+    .property("deposits", codecOptional(codecForNumber()))
+    .property("currency", codecForString())
     .build("Bench1Config");

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]