summaryrefslogtreecommitdiff
path: root/js/metrics.ts
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2019-03-20 12:39:47 -0400
committerGitHub <noreply@github.com>2019-03-20 12:39:47 -0400
commit9444bd71a0b9165ef1a900f19b08a88592d2bb5c (patch)
treed48f8bf5a8d21b3646adddc20fa279532b359efd /js/metrics.ts
parent842627d6b905f71aea821c426a886022b07270a5 (diff)
Website and manual improvements (#1967)
Diffstat (limited to 'js/metrics.ts')
-rw-r--r--js/metrics.ts14
1 files changed, 13 insertions, 1 deletions
diff --git a/js/metrics.ts b/js/metrics.ts
index 111015078..c4ba14c7d 100644
--- a/js/metrics.ts
+++ b/js/metrics.ts
@@ -34,7 +34,19 @@ function res(baseRes: null | msg.Base): Metrics {
};
}
-/** Receive metrics from the privileged side of Deno. */
+/** Receive metrics from the privileged side of Deno.
+ *
+ * > console.table(Deno.metrics())
+ * ┌──────────────────┬────────┐
+ * │ (index) │ Values │
+ * ├──────────────────┼────────┤
+ * │ opsDispatched │ 9 │
+ * │ opsCompleted │ 9 │
+ * │ bytesSentControl │ 504 │
+ * │ bytesSentData │ 0 │
+ * │ bytesReceived │ 856 │
+ * └──────────────────┴────────┘
+ */
export function metrics(): Metrics {
return res(dispatch.sendSync(...req()));
}