Skip to content

Commit

Permalink
Mark benchmark API as unstable
Browse files Browse the repository at this point in the history
Summary:
Changelog: [internal]

We're still iterating on this feature and making sure it reports stable results, so marking it as `unstable` to set expectations.

Differential Revision: D67975844
  • Loading branch information
rubennorte authored and facebook-github-bot committed Jan 9, 2025
1 parent 1cbcea4 commit a44ca40
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/react-native-fantom/runner/getFantomTestConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const DEFAULT_MODE: FantomTestConfigMode =

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

const FANTOM_BENCHMARK_SUITE_RE = /\nbenchmark(\s*)\.suite\(/g;
const FANTOM_BENCHMARK_SUITE_RE = /\nunstable_benchmark(\s*)\.suite\(/g;

/**
* Extracts the Fantom configuration from the test file, specified as part of
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-fantom/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export function createRoot(rootConfig?: RootConfig): Root {
return new Root(rootConfig);
}

export const benchmark = Benchmark;
export const unstable_benchmark = Benchmark;

type FantomConstants = $ReadOnly<{
isRunningFromCI: boolean,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import type {

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

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

benchmark
unstable_benchmark
.suite('ReactNativeElement vs. ReactFabricHostComponent')
.add('ReactNativeElement', () => {
// eslint-disable-next-line no-new
Expand Down

0 comments on commit a44ca40

Please sign in to comment.