UNPKG

@nativescript/firebase-performance

Version:

NativeScript Firebase - Performancee

51 lines (50 loc) 2.19 kB
import { FirebaseApp } from '@nativescript/firebase-core'; import { HttpMethod, IHttpMetric, IPerformance, ITrace } from './common'; export declare class HttpMetric implements IHttpMetric { _native: com.google.firebase.perf.metrics.HttpMetric; static fromNative(metric: com.google.firebase.perf.metrics.HttpMetric): HttpMetric; get native(): com.google.firebase.perf.metrics.HttpMetric; get android(): com.google.firebase.perf.metrics.HttpMetric; 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: com.google.firebase.perf.metrics.Trace; static fromNative(trace: com.google.firebase.perf.metrics.Trace): Trace; get native(): com.google.firebase.perf.metrics.Trace; get android(): com.google.firebase.perf.metrics.Trace; 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: com.google.firebase.perf.FirebasePerformance; _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(): com.google.firebase.perf.FirebasePerformance; get android(): com.google.firebase.perf.FirebasePerformance; get app(): FirebaseApp; }