Skip to content

Commit e894ad4

Browse files
committed
chore: revert to namespaced call
1 parent 9fb98e8 commit e894ad4

1 file changed

Lines changed: 2 additions & 14 deletions

File tree

packages/perf/lib/modular/index.js

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -52,22 +52,10 @@ export async function initializePerformance(app, settings) {
5252
const perf = getApp(app.name).perf();
5353

5454
if (settings && settings.dataCollectionEnabled !== undefined) {
55-
if (!isBoolean(settings.dataCollectionEnabled)) {
56-
throw new Error("getPerformance().dataCollectionEnabled = 'enabled' must be a boolean.");
57-
}
58-
perf._isPerformanceCollectionEnabled = settings.dataCollectionEnabled;
59-
perf.native.setPerformanceCollectionEnabled(settings.dataCollectionEnabled);
55+
perf.dataCollectionEnabled = settings.dataCollectionEnabled;
6056
}
6157
if (settings && settings.instrumentationEnabled !== undefined) {
62-
if (!isBoolean(settings.instrumentationEnabled)) {
63-
throw new Error("getPerformance().instrumentationEnabled = 'enabled' must be a boolean.");
64-
}
65-
if (Platform.OS == 'ios') {
66-
// We don't change for android as it cannot be set from code, it is set at gradle build time.
67-
perf._instrumentationEnabled = settings.instrumentationEnabled;
68-
// No need to await, as it only takes effect on the next app run.
69-
perf.native.instrumentationEnabled(settings.instrumentationEnabled);
70-
}
58+
perf.instrumentationEnabled = settings.instrumentationEnabled;
7159
}
7260

7361
return perf;

0 commit comments

Comments
 (0)