1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-25 00:29:09 -05:00

chore: deprecate Deno.metrics() API (#20684)

This API is providing hoops to jump through with undergoing migration to
`#[op2]` macro. 

The overhead of supporting this API is non-trivial and besides internal
use of it in test sanitizers is very rarely used in the wild.
This commit is contained in:
Bartek Iwańczuk 2023-09-26 17:34:53 +02:00 committed by GitHub
parent 3c0d6de155
commit 50a3209fff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3721,7 +3721,10 @@ declare namespace Deno {
*/ */
export function truncateSync(name: string, len?: number): void; export function truncateSync(name: string, len?: number): void;
/** @category Observability */ /** @category Observability
*
* @deprecated This API has been deprecated in Deno v1.37.1.
*/
export interface OpMetrics { export interface OpMetrics {
opsDispatched: number; opsDispatched: number;
opsDispatchedSync: number; opsDispatchedSync: number;
@ -3736,7 +3739,10 @@ declare namespace Deno {
bytesReceived: number; bytesReceived: number;
} }
/** @category Observability */ /** @category Observability
*
* @deprecated This API has been deprecated in Deno v1.37.1.
*/
export interface Metrics extends OpMetrics { export interface Metrics extends OpMetrics {
ops: Record<string, OpMetrics>; ops: Record<string, OpMetrics>;
} }
@ -3765,6 +3771,8 @@ declare namespace Deno {
* ``` * ```
* *
* @category Observability * @category Observability
*
* @deprecated This API has been deprecated in Deno v1.37.1.
*/ */
export function metrics(): Metrics; export function metrics(): Metrics;