Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53410
Changelog: [Internal]
Adding babel-istanbul-plugin to instrument bundle code with coverage reporting.
Metro will transform source code only when coverage flag is set up globally in jest.
Coverage map is then provided by runner as part of test result.
Reviewed By: sammy-SC
Differential Revision: D80716433
fbshipit-source-id: 3831f227f8793f874f0d2366759bb6916e747c72
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53143
# Changelog:
[Internal] -
This refactors the way Fantom benchmark test results are passed to the top level, making it type safe and more maintainable.
Reviewed By: andrewdacenko
Differential Revision: D79812707
fbshipit-source-id: d8bfef7e1b0c11b277a08f5e4c810f8c1efd7f89
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52925
# Changelog:
[Internal] -
This adds an extra "ranking" report when running Fantom benchmark vs different React Feature flag configurations.
It can be very useful when implementing some particular optimization, to streamline the before/after comparison wit this optimization enabled/disabled.
Reviewed By: andrewdacenko
Differential Revision: D79269601
fbshipit-source-id: f29e761e313d6857e5b3ac65faf2a387a84be9df
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52827
Changelog: [internal]
This adds **support for creating Hermes/JS sampling profiler traces in Fantom**, which is especially useful when running benchmarks.
Usage:
```
FANTOM_PROFILE_JS=1 yarn fantom Animated-benchmark
```
Output:
{F1980642216}
After this, the trace is fully symbolicated.
Can be opened directly in Google Chrome:
{F1980642229}
Or in the built-in viewer in VSCode:
{F1980642242} {F1980642240} {F1980642241}
When collapsing frames in the Flame Chart viewer in VSCode, we can quickly identify opportunities for optimizations.
This also supports multi-config environments. In that case, trace file names are created using a short representation of the configuration.
User guide for benchmarks in Fantom, including how to use this, will be done in a future diff.
NOTE: This still doesn't work in OSS because we don't support optimized mode there. In dev mode, there's a segmentation fault coming from this line: `hermesRuntime->sampledTraceToStreamInDevToolsFormat(fileStream)`
Reviewed By: sammy-SC
Differential Revision: D78905646
fbshipit-source-id: 382ddd5034db601309bd118cedde2fe0d57fde98
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52765
Changelog: [internal]
Reported locations for errors in Fantom is wrong, because it seems it's not ignoring "infra" frames.
This was caused by the `stack` property in `ErrorWithCustomBlame` being set on the error objects and shadowing the getter that removes the necessary frames. This fixes that by forcing that property to be deleted.
Reviewed By: christophpurrer
Differential Revision: D78747119
fbshipit-source-id: 81d6ce74041382d7582e2066409e839d28d91052
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52601
Changelog: [internal]
Fixes a bug in Fantom when throwing a value that's not an instance of `Error` in a test.
Reviewed By: javache
Differential Revision: D78332756
fbshipit-source-id: 350479dcb7bcea399070c6851aca76a1d1cc2629
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52474
1. Enables the feature flags for fragment refs on fbsource
2. Adds a test with Fantom for usage of `FragmentInstance#observeUsing` and `FragmentInstance#unobserveUsing`.
3. Exposes the `ReactFragmentInstance` type with the common methods that are used on native. We can override the DOM only methods in www libdefs.
Changelog: [Internal]
Reviewed By: rubennorte
Differential Revision: D74326262
fbshipit-source-id: e35ee45b23179ad3ba5527763567c9b04c127eff