File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
packages/commands/test/src Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -19,9 +19,12 @@ export class PerformanceMeasurer {
19
19
// noop by default
20
20
}
21
21
) {
22
+ // Hack to make sure the profiler is ready to receive measures
23
+ await profiler.waitUntilReady(this.bundleId);
22
24
this.polling = profiler.pollPerformanceMeasures(this.bundleId, {
23
25
onMeasure: (measure) => {
24
- if (this.shouldStop) {
26
+ // The ios-instruments profiler yields measures at the end of the test when the polling is already stopped
27
+ if (this.shouldStop && process.env.PLATFORM !== "ios-instruments") {
25
28
this.polling?.stop();
26
29
}
27
30
@@ -60,6 +63,8 @@ export class PerformanceMeasurer {
60
63
61
64
// Ensure polling has stopped
62
65
this.polling?.stop();
66
+ // Hack for ios-instruments to get the measures at the end of the test
67
+ await profiler.getMeasures();
63
68
64
69
return {
65
70
time: time ?? 0,
You can’t perform that action at this time.
0 commit comments