diff options
Diffstat (limited to 'packages')
-rw-r--r-- | packages/taler-util/src/notifications.ts | 1 | ||||
-rw-r--r-- | packages/taler-wallet-core/src/wallet.ts | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/packages/taler-util/src/notifications.ts b/packages/taler-util/src/notifications.ts index 43ca6271e..7ef474754 100644 --- a/packages/taler-util/src/notifications.ts +++ b/packages/taler-util/src/notifications.ts @@ -172,6 +172,7 @@ export type ObservabilityEvent = } | { type: ObservabilityEventType.RequestFinishSuccess; + durationMs: number; } | { type: ObservabilityEventType.RequestFinishError; diff --git a/packages/taler-wallet-core/src/wallet.ts b/packages/taler-wallet-core/src/wallet.ts index fa78cf24b..2bafba3af 100644 --- a/packages/taler-wallet-core/src/wallet.ts +++ b/packages/taler-wallet-core/src/wallet.ts @@ -143,6 +143,7 @@ import { openPromise, parsePaytoUri, parseTalerUri, + performanceNow, sampleWalletCoreTransactions, setDangerousTimetravel, validateIban, @@ -1531,6 +1532,7 @@ async function handleCoreApiRequest( } try { + const start = performanceNow(); await ws.ensureWalletDbOpen(); oc.observe({ type: ObservabilityEventType.RequestStart, @@ -1540,8 +1542,10 @@ async function handleCoreApiRequest( operation as any, payload, ); + const end = performanceNow(); oc.observe({ type: ObservabilityEventType.RequestFinishSuccess, + durationMs: Number((end - start) / 1000n / 1000n), }); return { type: "response", |