diff options
author | Colin Ihrig <cjihrig@gmail.com> | 2022-10-25 11:21:14 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-25 11:21:14 -0400 |
commit | 606db35ccbe8e3c1ce93ae943a2f9850558400af (patch) | |
tree | 48123d79982e74a5be8c0679c6f1a7ef9abe2df1 /cli/dts/lib.deno.ns.d.ts | |
parent | f242d98280a7b261af9bf458498915d973f8d48e (diff) |
feat: stabilize Deno.loadavg() (#16412)
Diffstat (limited to 'cli/dts/lib.deno.ns.d.ts')
-rw-r--r-- | cli/dts/lib.deno.ns.d.ts | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/cli/dts/lib.deno.ns.d.ts b/cli/dts/lib.deno.ns.d.ts index 34d85ac87..ed6e8ad4f 100644 --- a/cli/dts/lib.deno.ns.d.ts +++ b/cli/dts/lib.deno.ns.d.ts @@ -314,6 +314,24 @@ declare namespace Deno { */ export function hostname(): string; + /** + * Returns an array containing the 1, 5, and 15 minute load averages. The + * load average is a measure of CPU and IO utilization of the last one, five, + * and 15 minute periods expressed as a fractional number. Zero means there + * is no load. On Windows, the three values are always the same and represent + * the current load, not the 1, 5 and 15 minute load averages. + * + * ```ts + * console.log(Deno.loadavg()); // e.g. [ 0.71, 0.44, 0.44 ] + * ``` + * + * Requires `allow-sys` permission. + * + * @tags allow-sys + * @category Observability + */ + export function loadavg(): number[]; + /** Reflects the `NO_COLOR` environment variable at program start. * * When the value is `true`, the Deno CLI will attempt to not send color codes |