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 | |
| parent | f242d98280a7b261af9bf458498915d973f8d48e (diff) | |
feat: stabilize Deno.loadavg() (#16412)
Diffstat (limited to 'cli/dts')
| -rw-r--r-- | cli/dts/lib.deno.ns.d.ts | 18 | ||||
| -rw-r--r-- | cli/dts/lib.deno.unstable.d.ts | 21 |
2 files changed, 18 insertions, 21 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 diff --git a/cli/dts/lib.deno.unstable.d.ts b/cli/dts/lib.deno.unstable.d.ts index 85b5911f8..1085c7039 100644 --- a/cli/dts/lib.deno.unstable.d.ts +++ b/cli/dts/lib.deno.unstable.d.ts @@ -245,27 +245,6 @@ declare namespace Deno { /** **UNSTABLE**: New API, yet to be vetted. * - * 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. - * There are questions around which permission this needs. And maybe should be - * renamed (loadAverage?). - * - * @tags allow-sys - * @category Observability - */ - export function loadavg(): number[]; - - /** **UNSTABLE**: New API, yet to be vetted. - * * Returns the release version of the Operating System. * * ```ts |
