Skip to content

Commit

Permalink
Update utils.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
rouzwelt committed Oct 29, 2024
1 parent 2f1ae58 commit f7915cb
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1351,3 +1351,14 @@ export async function getTokenSymbol(address: string, viemClient: ViemClient): P
}
return "UnknownSymbol";
}

export function memory(msg: string) {
// eslint-disable-next-line no-console
console.log(msg);
for (const [key, value] of Object.entries(process.memoryUsage())) {
// eslint-disable-next-line no-console
console.log(`Memory usage by ${key}, ${value / 1_000_000}MB `);
}
// eslint-disable-next-line no-console
console.log("\n---\n");
}

0 comments on commit f7915cb

Please sign in to comment.