Use RN performance API (JS bundle start time)
Description
Starting RN 0.72 there is a new Performance API that measures app start time and also measures the js bundle start time.
### Todo:
- [ ] Compare start time to our measurements
- [ ] Use RN measurements when available
- [ ] Add JSBundle Execution span
We can consider replacing our approach with this API when its available at runtime, for back compatibility, we can use ours instead. The API gives more insights as its able to measure the bundle loading.
Tested with 0.72.4 and only got zeros. Will have to investigate why before implementing.
{"_endTime": 0, "_executeJavaScriptBundleEntryPointEnd": 0, "_executeJavaScriptBundleEntryPointStart": 0, "_startTime": 0}
RN Team added more measurements since the initial issue. https://github.com/facebook/react-native/pull/38858/files#diff-af2cc8e2446df8183ad3ec780c463f6b7d9e39f45c86721dfd532c8a373c1d01
We can extract RN performance metrics on the native layers.
Example from iOS: https://github.com/facebook/react-native/blob/d09c02f9e2d468e4d0bde51890e312ae7003a3e6/packages/react-native/React/Base/RCTBridge.mm#L353-L356
Useful metric: ReactInstanceInit time, BridgeStart time, BundleLoad time -> https://github.com/facebook/react-native/blob/d09c02f9e2d468e4d0bde51890e312ae7003a3e6/packages/react-native/React/Base/RCTPLTag.h#L8-L31