-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9ecb3d6
commit 6ddfddc
Showing
3 changed files
with
76 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,41 @@ | ||
#!/usr/bin/env ts-node | ||
|
||
import fs from 'fs'; | ||
import path from 'path'; | ||
import si from 'systeminformation'; | ||
|
||
async function main(): Promise<void> { | ||
// NOOP | ||
await fs.promises.mkdir(path.join(__dirname, 'results'), { recursive: true }); | ||
const resultFilenames = await fs.promises.readdir( | ||
path.join(__dirname, 'results'), | ||
); | ||
const metricsFile = await fs.promises.open( | ||
path.join(__dirname, 'results', 'metrics.txt'), | ||
'w', | ||
); | ||
let concatenating = false; | ||
for (const resultFilename of resultFilenames) { | ||
if (/.+_metrics\.txt$/.test(resultFilename)) { | ||
const metricsData = await fs.promises.readFile( | ||
path.join(__dirname, 'results', resultFilename), | ||
); | ||
if (concatenating) { | ||
await metricsFile.write('\n'); | ||
} | ||
await metricsFile.write(metricsData); | ||
concatenating = true; | ||
} | ||
} | ||
await metricsFile.close(); | ||
const systemData = await si.get({ | ||
cpu: '*', | ||
osInfo: 'platform, distro, release, kernel, arch', | ||
system: 'model, manufacturer', | ||
}); | ||
await fs.promises.writeFile( | ||
path.join(__dirname, 'results', 'system.json'), | ||
JSON.stringify(systemData, null, 2), | ||
); | ||
} | ||
|
||
void main(); |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"cpu": { | ||
"manufacturer": "AMD", | ||
"brand": "Ryzen 7 2700X Eight-Core Processor", | ||
"vendor": "AMD", | ||
"family": "23", | ||
"model": "8", | ||
"stepping": "2", | ||
"revision": "", | ||
"voltage": "", | ||
"speed": 3.7, | ||
"speedMin": 2.2, | ||
"speedMax": 3.7, | ||
"governor": "performance", | ||
"cores": 16, | ||
"physicalCores": 8, | ||
"performanceCores": 8, | ||
"efficiencyCores": 0, | ||
"processors": 1, | ||
"socket": "", | ||
"flags": "fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb hw_pstate ssbd ibpb vmmcall fsgsbase bmi1 avx2 smep bmi2 rdseed adx smap clflushopt sha_ni xsaveopt xsavec xgetbv1 clzero irperf xsaveerptr arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif overflow_recov succor smca sev sev_es", | ||
"virtualization": true, | ||
"cache": { | ||
"l1d": 262144, | ||
"l1i": 524288, | ||
"l2": 4194304, | ||
"l3": 16777216 | ||
} | ||
}, | ||
"osInfo": { | ||
"platform": "linux", | ||
"distro": "nixos", | ||
"release": "22.11", | ||
"kernel": "6.1.23", | ||
"arch": "x64" | ||
}, | ||
"system": { | ||
"model": "System Product Name", | ||
"manufacturer": "System manufacturer" | ||
} | ||
} |