aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-harness/src/bench1.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-harness/src/bench1.ts')
-rw-r--r--packages/taler-harness/src/bench1.ts17
1 files changed, 9 insertions, 8 deletions
diff --git a/packages/taler-harness/src/bench1.ts b/packages/taler-harness/src/bench1.ts
index 84786d25a..0a4118ec1 100644
--- a/packages/taler-harness/src/bench1.ts
+++ b/packages/taler-harness/src/bench1.ts
@@ -19,19 +19,19 @@
*/
import {
buildCodecForObject,
+ codecForBoolean,
codecForNumber,
codecForString,
- codecForBoolean,
codecOptional,
j2s,
Logger,
} from "@gnu-taler/taler-util";
+import { createPlatformHttpLib } from "@gnu-taler/taler-util/http";
import {
- getDefaultNodeWallet2,
- NodeHttpLib,
- WalletApiOperation,
- Wallet,
AccessStats,
+ createNativeWalletHost2,
+ Wallet,
+ WalletApiOperation,
} from "@gnu-taler/taler-wallet-core";
/**
@@ -46,8 +46,9 @@ export async function runBench1(configJson: any): Promise<void> {
// Validate the configuration file for this benchmark.
const b1conf = codecForBench1Config().decode(configJson);
- const myHttpLib = new NodeHttpLib();
- myHttpLib.setThrottling(false);
+ const myHttpLib = createPlatformHttpLib({
+ enableThrottling: false,
+ });
const numIter = b1conf.iterations ?? 1;
const numDeposits = b1conf.deposits ?? 5;
@@ -81,7 +82,7 @@ export async function runBench1(configJson: any): Promise<void> {
console.log("wallet DB stats", j2s(getDbStats!()));
}
- const res = await getDefaultNodeWallet2({
+ const res = await createNativeWalletHost2({
// No persistent DB storage.
persistentStoragePath: undefined,
httpLib: myHttpLib,