Skip to content

Commit

Permalink
feat: print more machine info
Browse files Browse the repository at this point in the history
  • Loading branch information
SyMind committed May 31, 2024
1 parent 867c1de commit 96b6c8c
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,21 @@ if (!command || command === "build") {

if (!command || command === "bench") {
if (isGitHubActions) {
await $`lscpu -e=CPU,MHZ`;
await $`echo "CPU Usage: "$[100-$(vmstat 1 2|tail -1|awk '{print $15}')]"%"`;
await $`echo "===== System Information ====="`;
await $`uname -a`;
await $`cat /etc/os-release`;
await $`uname -r`;
await $`uptime`;

await $`echo "===== Resource Usage ====="`;
await $`top -b -n1 | head -n10`;
await $`vmstat`;
await $`df -h`;
await $`free -h`;

await $`echo "===== Hardware Information ====="`;
await $`lscpu`;
await $`lsblk`;
}

const shardPair = shard.split("/").map(t => parseInt(t, 10));
Expand Down

0 comments on commit 96b6c8c

Please sign in to comment.