Skip to content

Commit b4f6df2

Browse files
committed
playground: add time logs
1 parent 90e222e commit b4f6df2

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

playground/base/package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

playground/base/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"description": "",
1515
"dependencies": {
1616
"dotenv": "^17.2.3",
17-
"rrelayer": "^1.0.4"
17+
"rrelayer": "^1.0.5"
1818
},
1919
"devDependencies": {
2020
"prettier": "^3.6.2",

playground/base/src/transaction/send-transaction.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,13 @@ export const sendTransaction = async () => {
1010
}
1111
const transaction = await relayerClient.transaction.send(request);
1212
console.log('transaction', transaction);
13+
const startTime = Date.now();
1314

1415
let receipt = await relayerClient.transaction.waitForTransactionReceiptById(transaction.id);
1516
console.log('receipt', receipt);
17+
const endTime = Date.now();
18+
const timeTaken = endTime - startTime;
19+
console.log(`⏱️ Time to receipt: ${timeTaken}ms (${(timeTaken / 1000).toFixed(2)}s)`);
1620
};
1721

1822
sendTransaction().then(() => console.log('send-transaction done'));

sdk/typescript/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rrelayer",
3-
"version": "1.0.4",
3+
"version": "1.0.5",
44
"description": "The rrelayer sdk",
55
"main": "dist/index.js",
66
"scripts": {

0 commit comments

Comments
 (0)