summaryrefslogtreecommitdiff
path: root/runtime/js/30_metrics.js
blob: ecc1cfc64ed3f821b7bbe44037d65f516b8288f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
"use strict";

((window) => {
  const core = window.Deno.core;

  function metrics() {
    const { combined, ops } = core.opSync("op_metrics");
    if (ops) {
      combined.ops = ops;
    }
    return combined;
  }

  window.__bootstrap.metrics = {
    metrics,
  };
})(this);