diff options
| author | Elias Sjögreen <eliassjogreen1@gmail.com> | 2020-10-26 15:54:27 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-26 10:54:27 -0400 |
| commit | 305a9c04ba60630f9708b681cfebb522a6110cc3 (patch) | |
| tree | 36761c300215f1674c0ad2865f19538d88ec129e /cli/rt | |
| parent | d52fb903cda4c30bb1673260c673ba27167ab7b1 (diff) | |
feat(unstable): add Deno.systemCpuInfo() (#7774)
Diffstat (limited to 'cli/rt')
| -rw-r--r-- | cli/rt/30_os.js | 5 | ||||
| -rw-r--r-- | cli/rt/90_deno_ns.js | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/cli/rt/30_os.js b/cli/rt/30_os.js index 892d3bf8b..ebc4e8916 100644 --- a/cli/rt/30_os.js +++ b/cli/rt/30_os.js @@ -19,6 +19,10 @@ return core.jsonOpSync("op_system_memory_info"); } + function systemCpuInfo() { + return core.jsonOpSync("op_system_cpu_info"); + } + function exit(code = 0) { core.jsonOpSync("op_exit", { code }); throw new Error("Code not reachable"); @@ -55,6 +59,7 @@ exit, osRelease, systemMemoryInfo, + systemCpuInfo, hostname, loadavg, }; diff --git a/cli/rt/90_deno_ns.js b/cli/rt/90_deno_ns.js index 7e8598923..9667b47c8 100644 --- a/cli/rt/90_deno_ns.js +++ b/cli/rt/90_deno_ns.js @@ -103,6 +103,7 @@ __bootstrap.denoNsUnstable = { hostname: __bootstrap.os.hostname, osRelease: __bootstrap.os.osRelease, systemMemoryInfo: __bootstrap.os.systemMemoryInfo, + systemCpuInfo: __bootstrap.os.systemCpuInfo, applySourceMap: __bootstrap.errorStack.opApplySourceMap, formatDiagnostics: __bootstrap.errorStack.opFormatDiagnostics, shutdown: __bootstrap.net.shutdown, |
