1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-24 08:09:08 -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;
/** @category Observability */
/** @category Observability
*
* @deprecated This API has been deprecated in Deno v1.37.1.
*/
export interface OpMetrics {
opsDispatched: number;
opsDispatchedSync: number;
@ -3736,7 +3739,10 @@ declare namespace Deno {
bytesReceived: number;
}
/** @category Observability */
/** @category Observability
*
* @deprecated This API has been deprecated in Deno v1.37.1.
*/
export interface Metrics extends OpMetrics {
ops: Record<string, OpMetrics>;
}
@ -3765,6 +3771,8 @@ declare namespace Deno {
* ```
*
* @category Observability
*
* @deprecated This API has been deprecated in Deno v1.37.1.
*/
export function metrics(): Metrics;