Skip to content

Commit 89a4f64

Browse files
authored
Remove performance-types-exp (#4500)
* remove performance-types-exp * fix tsdoc format * remove api report
1 parent c632148 commit 89a4f64

File tree

11 files changed

+52
-117
lines changed

11 files changed

+52
-117
lines changed

.changeset/config.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
"@firebase/installations-compat",
2626
"@firebase/messaging-exp",
2727
"@firebase/performance-exp",
28-
"@firebase/performance-types-exp",
2928
"@firebase/remote-config-exp",
3029
"@firebase/remote-config-compat",
3130
"firebase-exp",

common/api-review/performance-exp.api.md

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,47 @@
55
```ts
66

77
import { FirebaseApp } from '@firebase/app-exp';
8-
import { FirebasePerformance } from '@firebase/performance-types-exp';
9-
import { PerformanceSettings } from '@firebase/performance-types-exp';
10-
import { PerformanceTrace } from '@firebase/performance-types-exp';
118

12-
export { FirebasePerformance }
9+
// @public (undocumented)
10+
export interface FirebasePerformance {
11+
dataCollectionEnabled: boolean;
12+
instrumentationEnabled: boolean;
13+
}
1314

1415
// @public
15-
export function getPerformance(app: FirebaseApp, settings?: PerformanceSettings): FirebasePerformance;
16+
export function getPerformance(app: FirebaseApp): FirebasePerformance;
1617

17-
export { PerformanceSettings }
18-
19-
export { PerformanceTrace }
18+
// @public
19+
export function initializePerformance(app: FirebaseApp, settings?: PerformanceSettings): FirebasePerformance;
20+
21+
// @public (undocumented)
22+
export interface PerformanceSettings {
23+
dataCollectionEnabled?: boolean;
24+
instrumentationEnabled?: boolean;
25+
}
26+
27+
// @public (undocumented)
28+
export interface PerformanceTrace {
29+
getAttribute(attr: string): string | undefined;
30+
getAttributes(): {
31+
[key: string]: string;
32+
};
33+
getMetric(metricName: string): number;
34+
incrementMetric(metricName: string, num?: number): void;
35+
putAttribute(attr: string, value: string): void;
36+
putMetric(metricName: string, num: number): void;
37+
record(startTime: number, duration: number, options?: {
38+
metrics?: {
39+
[key: string]: number;
40+
};
41+
attributes?: {
42+
[key: string]: string;
43+
};
44+
}): void;
45+
removeAttribute(attr: string): void;
46+
start(): void;
47+
stop(): void;
48+
}
2049

2150
// @public
2251
export function trace(performance: FirebasePerformance, name: string): PerformanceTrace;

common/api-review/performance-types-exp.api.md

Lines changed: 0 additions & 45 deletions
This file was deleted.

packages-exp/performance-exp/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
"@firebase/logger": "0.2.6",
3636
"@firebase/installations-exp": "0.0.900",
3737
"@firebase/util": "0.3.4",
38-
"@firebase/performance-types-exp": "0.0.900",
3938
"@firebase/component": "0.2.0",
4039
"tslib": "^1.11.1"
4140
},

packages-exp/performance-exp/src/controllers/perf.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@ import { getInitializationPromise } from '../services/initialization_service';
2121
import { Api } from '../services/api_service';
2222
import { FirebaseApp } from '@firebase/app-exp';
2323
import { _FirebaseInstallationsInternal } from '@firebase/installations-types-exp';
24-
import {
25-
PerformanceSettings,
26-
FirebasePerformance
27-
} from '@firebase/performance-types-exp';
24+
import { PerformanceSettings, FirebasePerformance } from '../public_types';
2825
import { validateIndexedDBOpenable } from '@firebase/util';
2926
import { setupTransportService } from '../services/transport_service';
3027
import { consoleLogger } from '../utils/console_logger';

packages-exp/performance-exp/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import {
1919
FirebasePerformance,
2020
PerformanceSettings,
2121
PerformanceTrace
22-
} from '@firebase/performance-types-exp';
22+
} from './public_types';
2323
import { ERROR_FACTORY, ErrorCode } from './utils/errors';
2424
import { setupApi } from './services/api_service';
2525
import { PerformanceController } from './controllers/perf';

packages-exp/performance-types-exp/index.d.ts renamed to packages-exp/performance-exp/src/public_types.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ export interface PerformanceTrace {
5858
* start/stop. This is useful for use cases in which the trace cannot directly be used
5959
* (e.g. if the duration was captured before the Performance SDK was loaded).
6060
*
61-
* @param startTime trace start time since epoch in millisec.
62-
* @param duration The duraction of the trace in millisec.
63-
* @param options An object which can optionally hold maps of custom metrics and
61+
* @param startTime - trace start time since epoch in millisec.
62+
* @param duration - The duraction of the trace in millisec.
63+
* @param options - An object which can optionally hold maps of custom metrics and
6464
* custom attributes.
6565
*/
6666
record(
@@ -76,8 +76,8 @@ export interface PerformanceTrace {
7676
* exist, it creates one with that name and the value equal to the given number. The value will be floored down to an
7777
* integer.
7878
*
79-
* @param metricName The name of the custom metric.
80-
* @param num The number to be added to the value of the custom metric. If not provided, it
79+
* @param metricName - The name of the custom metric.
80+
* @param num - The number to be added to the value of the custom metric. If not provided, it
8181
* uses a default value of one.
8282
*/
8383
incrementMetric(metricName: string, num?: number): void;
@@ -86,34 +86,34 @@ export interface PerformanceTrace {
8686
* a metric with that name already exists on the trace instance or not. The value will be floored down to an
8787
* integer.
8888
*
89-
* @param metricName Name of the custom metric.
90-
* @param num Value to of the custom metric.
89+
* @param metricName - Name of the custom metric.
90+
* @param num - Value to of the custom metric.
9191
*/
9292
putMetric(metricName: string, num: number): void;
9393
/**
9494
* Returns the value of the custom metric by that name. If a custom metric with that name does
9595
* not exist will return zero.
9696
*
97-
* @param metricName Name of the custom metric.
97+
* @param metricName - Name of the custom metric.
9898
*/
9999
getMetric(metricName: string): number;
100100
/**
101101
* Set a custom attribute of a trace to a certain value.
102102
*
103-
* @param attr Name of the custom attribute.
104-
* @param value Value of the custom attribute.
103+
* @param attr - Name of the custom attribute.
104+
* @param value - Value of the custom attribute.
105105
*/
106106
putAttribute(attr: string, value: string): void;
107107
/**
108108
* Retrieves the value which a custom attribute is set to.
109109
*
110-
* @param attr Name of the custom attribute.
110+
* @param attr - Name of the custom attribute.
111111
*/
112112
getAttribute(attr: string): string | undefined;
113113
/**
114114
* Removes the specified custom attribute from a trace instance.
115115
*
116-
* @param attr Name of the custom attribute.
116+
* @param attr - Name of the custom attribute.
117117
*/
118118
removeAttribute(attr: string): void;
119119
/**

packages-exp/performance-exp/src/resources/trace.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import {
3535
isValidMetricName,
3636
convertMetricValueToInteger
3737
} from '../utils/metric_utils';
38-
import { PerformanceTrace } from '@firebase/performance-types-exp';
38+
import { PerformanceTrace } from '../public_types';
3939
import { PerformanceController } from '../controllers/perf';
4040

4141
const enum TraceState {

packages-exp/performance-types-exp/api-extractor.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

packages-exp/performance-types-exp/package.json

Lines changed: 0 additions & 30 deletions
This file was deleted.

packages-exp/performance-types-exp/tsconfig.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)