| 15 | }); |
| 16 | |
| 17 | export class HttpMetric implements IHttpMetric { |
| 18 | _native: com.google.firebase.perf.metrics.HttpMetric; |
| 19 | |
| 20 | static fromNative(metric: com.google.firebase.perf.metrics.HttpMetric) { |
| 21 | if (metric instanceof com.google.firebase.perf.metrics.HttpMetric) { |
| 22 | const result = new HttpMetric(); |
| 23 | result._native = metric; |
| 24 | return result; |
| 25 | } |
| 26 | return null; |
| 27 | } |
| 28 | |
| 29 | get native() { |
| 30 | return this._native; |
| 31 | } |
| 32 | get android() { |
| 33 | return this.native; |
| 34 | } |
| 35 | |
| 36 | getAttribute(attribute: string): string { |
| 37 | return this.native.getAttribute(attribute); |
| 38 | } |
| 39 | getAttributes(): { [key: string]: string } { |
| 40 | return deserialize(this.native.getAttributes()); |
| 41 | } |
| 42 | putAttribute(attribute: string, value: string): void { |
| 43 | this.native.putAttribute(attribute, value); |
| 44 | } |
| 45 | removeAttribute(attribute: string): void { |
| 46 | this.native.removeAttribute(attribute); |
| 47 | } |
| 48 | setHttpResponseCode(code: number): void { |
| 49 | this.native.setHttpResponseCode(code); |
| 50 | } |
| 51 | setRequestPayloadSize(bytes: number): void { |
| 52 | this.native.setRequestPayloadSize(bytes); |
| 53 | } |
| 54 | setResponseContentType(contentType: string): void { |
| 55 | this.native.setResponseContentType(contentType); |
| 56 | } |
| 57 | setResponsePayloadSize(bytes: number): void { |
| 58 | this.native.setResponsePayloadSize(bytes); |
| 59 | } |
| 60 | start() { |
| 61 | this.native.start(); |
| 62 | } |
| 63 | stop() { |
| 64 | this.native.stop(); |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | export class Trace implements ITrace { |
| 69 | _native: com.google.firebase.perf.metrics.Trace; |
nothing calls this directly
no outgoing calls
no test coverage detected