Trying to observe 'react-native-mark' type returns always empty array of entries.
alexferrermano opened this issue · comments
Hi,
I am trying to reproduce this code in iOS, in order to get the following measures:
import performance, { PerformanceObserver } from 'react-native-performance';
new PerformanceObserver((list, observer) => {
if (list.getEntries().find((entry) => entry.name === 'runJsBundleEnd')) {
performance.measure('nativeLaunch', 'nativeLaunchStart', 'nativeLaunchEnd');
performance.measure('runJsBundle', 'runJsBundleStart', 'runJsBundleEnd');
}
}).observe({ type: 'react-native-mark', buffered: true });
I tried several times but I am getting always an empty array of entries. I also tried with the release build.
I am missing some important step from the documentation?
Many thanks!
Hi, did you link the native library too?
Hi Thanks for your reply. It was working finally I was not calling it in the proper place. Thanks!