1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-26 00:59:24 -05:00
denoland-deno/cli/js/ops/runtime.ts

41 lines
874 B
TypeScript
Raw Normal View History

2020-01-02 15:13:47 -05:00
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { sendSync } from "./dispatch_json.ts";
2018-10-05 13:21:15 -04:00
export interface Start {
args: string[];
cwd: string;
debugFlag: boolean;
denoVersion: string;
noColor: boolean;
pid: number;
repl: boolean;
target: string;
tsVersion: string;
unstableFlag: boolean;
v8Version: string;
versionFlag: boolean;
}
export function opStart(): Start {
return sendSync("op_start");
}
2019-02-13 08:50:15 -05:00
export interface Metrics {
2018-10-05 13:21:15 -04:00
opsDispatched: number;
opsDispatchedSync: number;
opsDispatchedAsync: number;
opsDispatchedAsyncUnref: number;
2018-10-05 13:21:15 -04:00
opsCompleted: number;
opsCompletedSync: number;
opsCompletedAsync: number;
opsCompletedAsyncUnref: number;
2018-10-05 13:21:15 -04:00
bytesSentControl: number;
bytesSentData: number;
bytesReceived: number;
}
export function metrics(): Metrics {
2020-02-25 09:14:27 -05:00
return sendSync("op_metrics");
}