Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/deno/cli/js/lib.deno.ns.d.ts>Deno.metrics

A modern runtime for JavaScript and TypeScript.
Go to Latest
function Deno.metrics
import { Deno } from "https://deno.land/x/deno@v1.0.0/cli/js/lib.deno.ns.d.ts";
const { metrics } = Deno;

Receive metrics from the privileged side of Deno. This is primarily used in the development of Deno. 'Ops', also called 'bindings', are the go-between between Deno Javascript and Deno Rust.

 > console.table(Deno.metrics())
 ┌─────────────────────────┬────────┐
 │         (index)         │ Values │
 ├─────────────────────────┼────────┤
 │      opsDispatched      │   3    │
 │    opsDispatchedSync    │   2    │
 │   opsDispatchedAsync    │   1    │
 │ opsDispatchedAsyncUnref │   0    │
 │      opsCompleted       │   3    │
 │    opsCompletedSync     │   2    │
 │    opsCompletedAsync    │   1    │
 │ opsCompletedAsyncUnref  │   0    │
 │    bytesSentControl     │   73   │
 │      bytesSentData      │   0    │
 │      bytesReceived      │  375   │
 └─────────────────────────┴────────┘