From 65a37f8b67d700131e78dc097ade88ac8a7c958a Mon Sep 17 00:00:00 2001 From: Cong-Cong Pan Date: Thu, 30 May 2024 16:05:35 +0800 Subject: [PATCH] feat: print cpu status (#35) --- bin/cli.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/cli.js b/bin/cli.js index 78a5effd..e5b16cd1 100644 --- a/bin/cli.js +++ b/bin/cli.js @@ -110,6 +110,11 @@ 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}')]"%"`; + } + const shardPair = shard.split("/").map(t => parseInt(t, 10)); const [currentIndex, totalShards] = shardPair;