1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -05:00

chore: remove Deno.metrics() (#25167)

This commit is contained in:
Asher Gomez 2024-08-31 08:43:32 +10:00 committed by GitHub
parent 35074a10c6
commit 504ae362d5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 0 additions and 45 deletions

View file

@ -4060,43 +4060,6 @@ declare namespace Deno {
bytesReceived: number;
}
/** @category Runtime
*
* @deprecated This will be removed in Deno 2.0.
*/
export interface Metrics extends OpMetrics {
ops: Record<string, OpMetrics>;
}
/** 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 sandbox and the rest of Deno.
*
* ```shell
* > 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
*
* ```
*
* @category Runtime
*
* @deprecated This will be removed in Deno 2.0.
*/
export function metrics(): Metrics;
/**
* A map of open resources that Deno is tracking. The key is the resource ID
* (_rid_) and the value is its representation.

View file

@ -32,10 +32,6 @@ import * as cron from "ext:deno_cron/01_cron.ts";
import * as webgpuSurface from "ext:deno_webgpu/02_surface.js";
const denoNs = {
metrics: () => {
internals.warnOnDeprecatedApi("Deno.metrics()", new Error().stack);
return core.metrics();
},
Process: process.Process,
run: process.run,
isatty: tty.isatty,

View file

@ -946,7 +946,6 @@ function bootstrapMainRuntime(runtimeOptions, warmup = false) {
delete Deno.funlockSync;
delete Deno.iter;
delete Deno.iterSync;
delete Deno.metrics;
delete Deno.readAll;
delete Deno.readAllSync;
delete Deno.read;
@ -1136,7 +1135,6 @@ function bootstrapWorkerRuntime(
delete Deno.funlockSync;
delete Deno.iter;
delete Deno.iterSync;
delete Deno.metrics;
delete Deno.readAll;
delete Deno.readAllSync;
delete Deno.read;

View file

@ -17,7 +17,6 @@ console.log("Deno.funlock is", Deno.funlock);
console.log("Deno.funlockSync is", Deno.funlockSync);
console.log("Deno.iter is", Deno.iter);
console.log("Deno.iterSync is", Deno.iterSync);
console.log("Deno.metrics is", Deno.metrics);
console.log("Deno.readAll is", Deno.readAll);
console.log("Deno.readAllSync is", Deno.readAllSync);
console.log("Deno.read is", Deno.read);

View file

@ -14,7 +14,6 @@ Deno.funlock is undefined
Deno.funlockSync is undefined
Deno.iter is undefined
Deno.iterSync is undefined
Deno.metrics is undefined
Deno.readAll is undefined
Deno.readAllSync is undefined
Deno.read is undefined