Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno/cli/dts/lib.deno.ns.d.ts>Deno.loadavg

A modern runtime for JavaScript and TypeScript.
Go to Latest
function Deno.loadavg
allow-sys
import { Deno } from "https://deno.land/x/deno@v1.28.0/cli/dts/lib.deno.ns.d.ts";
const { loadavg } = Deno;

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.

console.log(Deno.loadavg());  // e.g. [ 0.71, 0.44, 0.44 ]

Requires allow-sys permission.

Returns

number[]