Skip to content

Commit 8310d65

Browse files
rubennortefacebook-github-bot
authored andcommitted
Mark benchmark API as unstable (facebook#48570)
Summary: Pull Request resolved: facebook#48570 Changelog: [internal] We're still iterating on this feature and making sure it reports stable results, so marking it as `unstable` to set expectations. Reviewed By: andrewdacenko Differential Revision: D67975844 fbshipit-source-id: 41e93cb9cb0c887a96178e4a4d5078d1899b2478
1 parent 8d67d51 commit 8310d65

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

packages/react-native-fantom/runner/getFantomTestConfig.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const DEFAULT_MODE: FantomTestConfigMode =
4646

4747
const FANTOM_FLAG_FORMAT = /^(\w+):(\w+)$/;
4848

49-
const FANTOM_BENCHMARK_SUITE_RE = /\nbenchmark(\s*)\.suite\(/g;
49+
const FANTOM_BENCHMARK_SUITE_RE = /\nunstable_benchmark(\s*)\.suite\(/g;
5050

5151
/**
5252
* Extracts the Fantom configuration from the test file, specified as part of

packages/react-native-fantom/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ export function createRoot(rootConfig?: RootConfig): Root {
139139
return new Root(rootConfig);
140140
}
141141

142-
export const benchmark = Benchmark;
142+
export const unstable_benchmark = Benchmark;
143143

144144
type FantomConstants = $ReadOnly<{
145145
isRunningFromCI: boolean,

packages/react-native/Libraries/ReactNative/ReactFabricPublicInstance/__tests__/ReactFabricPublicInstance-benchmark-itest.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import type {
1717

1818
import ReactNativeElement from '../../../../src/private/webapis/dom/nodes/ReactNativeElement';
1919
import ReactFabricHostComponent from '../../../ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent';
20-
import {benchmark} from '@react-native/fantom';
20+
import {unstable_benchmark} from '@react-native/fantom';
2121
import nullthrows from 'nullthrows';
2222

2323
// Create fake parameters for the class.
@@ -31,7 +31,7 @@ const viewConfig: ViewConfig = {
3131
// $FlowExpectedError[incompatible-type]
3232
const internalInstanceHandle: InternalInstanceHandle = {};
3333

34-
benchmark
34+
unstable_benchmark
3535
.suite('ReactNativeElement vs. ReactFabricHostComponent')
3636
.add('ReactNativeElement', () => {
3737
// eslint-disable-next-line no-new

0 commit comments

Comments
 (0)