idlebench 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +69 -0
- package/dist/commands/doctor.d.ts +4 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +107 -0
- package/dist/commands/run.d.ts +2 -0
- package/dist/commands/run.d.ts.map +1 -0
- package/dist/commands/run.js +302 -0
- package/dist/commands/upload.d.ts +4 -0
- package/dist/commands/upload.d.ts.map +1 -0
- package/dist/commands/upload.js +88 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +78 -0
- package/dist/lib/benchmark.d.ts +7 -0
- package/dist/lib/benchmark.d.ts.map +1 -0
- package/dist/lib/benchmark.js +34 -0
- package/dist/lib/docker.d.ts +8 -0
- package/dist/lib/docker.d.ts.map +1 -0
- package/dist/lib/docker.js +48 -0
- package/dist/lib/gpu.d.ts +13 -0
- package/dist/lib/gpu.d.ts.map +1 -0
- package/dist/lib/gpu.js +86 -0
- package/dist/lib/network.d.ts +9 -0
- package/dist/lib/network.d.ts.map +1 -0
- package/dist/lib/network.js +62 -0
- package/dist/lib/report.d.ts +76 -0
- package/dist/lib/report.d.ts.map +1 -0
- package/dist/lib/report.js +53 -0
- package/dist/lib/scoring.d.ts +24 -0
- package/dist/lib/scoring.d.ts.map +1 -0
- package/dist/lib/scoring.js +125 -0
- package/dist/lib/system.d.ts +10 -0
- package/dist/lib/system.d.ts.map +1 -0
- package/dist/lib/system.js +19 -0
- package/package.json +56 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import si from 'systeminformation';
|
|
2
|
+
export async function getSystemInfo() {
|
|
3
|
+
const [osInfo, cpu, mem] = await Promise.all([
|
|
4
|
+
si.osInfo(),
|
|
5
|
+
si.cpu(),
|
|
6
|
+
si.mem(),
|
|
7
|
+
]);
|
|
8
|
+
const osString = `${osInfo.distro} ${osInfo.release}`.trim() || osInfo.platform;
|
|
9
|
+
const ramGb = Math.round((mem.total / 1024 / 1024 / 1024) * 10) / 10;
|
|
10
|
+
const cores = cpu.cores || cpu.physicalCores || 1;
|
|
11
|
+
return {
|
|
12
|
+
os: osString,
|
|
13
|
+
arch: osInfo.arch,
|
|
14
|
+
cpuModel: `${cpu.manufacturer} ${cpu.brand}`.trim(),
|
|
15
|
+
cpuCores: cores,
|
|
16
|
+
ramGb,
|
|
17
|
+
platform: osInfo.platform,
|
|
18
|
+
};
|
|
19
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "idlebench",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Benchmark and verify idle compute before it earns. The CLI for IDLE compute providers.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "IdleBench",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/idlebench/idlebench-cli"
|
|
10
|
+
},
|
|
11
|
+
"keywords": [
|
|
12
|
+
"benchmark",
|
|
13
|
+
"gpu",
|
|
14
|
+
"compute",
|
|
15
|
+
"idle",
|
|
16
|
+
"verification",
|
|
17
|
+
"cuda",
|
|
18
|
+
"docker"
|
|
19
|
+
],
|
|
20
|
+
"bin": {
|
|
21
|
+
"idlebench": "./dist/index.js"
|
|
22
|
+
},
|
|
23
|
+
"main": "./dist/index.js",
|
|
24
|
+
"files": [
|
|
25
|
+
"dist",
|
|
26
|
+
"README.md",
|
|
27
|
+
"LICENSE"
|
|
28
|
+
],
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build": "tsc",
|
|
31
|
+
"dev": "ts-node src/index.ts",
|
|
32
|
+
"start": "node dist/index.js",
|
|
33
|
+
"clean": "rimraf dist",
|
|
34
|
+
"prepublishOnly": "npm run clean && npm run build"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"chalk": "^5.3.0",
|
|
38
|
+
"commander": "^12.0.0",
|
|
39
|
+
"execa": "^8.0.1",
|
|
40
|
+
"inquirer": "^9.2.15",
|
|
41
|
+
"ora": "^8.0.1",
|
|
42
|
+
"systeminformation": "^5.22.6",
|
|
43
|
+
"undici": "^6.6.2",
|
|
44
|
+
"zod": "^3.22.4"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@types/inquirer": "^9.0.9",
|
|
48
|
+
"@types/node": "^20",
|
|
49
|
+
"rimraf": "^5.0.5",
|
|
50
|
+
"typescript": "^5.4.3"
|
|
51
|
+
},
|
|
52
|
+
"engines": {
|
|
53
|
+
"node": ">=18.0.0"
|
|
54
|
+
},
|
|
55
|
+
"type": "module"
|
|
56
|
+
}
|