UNPKG

@nativescript/firebase-performance

Version:

NativeScript Firebase - Performancee

51 lines (50 loc) 1.86 kB
import { FirebaseApp } from '@nativescript/firebase-core'; import { HttpMethod, IHttpMetric, IPerformance, ITrace } from './common'; export declare class HttpMetric implements IHttpMetric { _native: FIRHTTPMetric; static fromUrlMethod(url: string, method: HttpMethod): HttpMetric; get native(): FIRHTTPMetric; get ios(): FIRHTTPMetric; getAttribute(attribute: string): string; getAttributes(): { [key: string]: string; }; putAttribute(attribute: string, value: string): void; removeAttribute(attribute: string): void; setHttpResponseCode(code: number): void; setRequestPayloadSize(bytes: number): void; setResponseContentType(contentType: string): void; setResponsePayloadSize(bytes: number): void; start(): void; stop(): void; } export declare class Trace implements ITrace { _native: FIRTrace; static fromNative(trace: FIRTrace): Trace; get native(): FIRTrace; get ios(): FIRTrace; getAttribute(attribute: string): string; getMetric(metricName: string): number; getMetrics(): { [key: string]: number; }; incrementMetric(metricName: string, incrementBy: number): void; putAttribute(attribute: string, value: string): void; putMetric(metricName: string, value: number): void; removeMetric(metricName: string): void; start(): void; stop(): void; } export declare class Performance implements IPerformance { _native: FIRPerformance; _app: FirebaseApp; constructor(); get isPerformanceCollectionEnabled(): boolean; set isPerformanceCollectionEnabled(value: boolean); newHttpMetric(url: string, httpMethod: HttpMethod): HttpMetric; newTrace(identifier: string): Trace; startTrace(identifier: string): Trace; get native(): FIRPerformance; get ios(): FIRPerformance; get app(): FirebaseApp; }