Remove verification function from ReactFabricPublicInstance benchmark (#48588)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48588

Changelog: [internal]

This has proved to be very CI and makes it fail a lot, so we're removing this for now.

Reviewed By: javache

Differential Revision: D67985917

fbshipit-source-id: 5ec7c1387ddfb8fb2a4e90450a98cb3caea9399f
This commit is contained in:
Rubén Norte
2025-01-10 03:35:04 -08:00
committed by Facebook GitHub Bot
parent bb6bbfc261
commit deea42329e
@@ -18,7 +18,6 @@ import type {
import ReactNativeElement from '../../../../src/private/webapis/dom/nodes/ReactNativeElement';
import ReactFabricHostComponent from '../../../ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent';
import {unstable_benchmark} from '@react-native/fantom';
import nullthrows from 'nullthrows';
// Create fake parameters for the class.
const tag = 11;
@@ -40,22 +39,4 @@ unstable_benchmark
.add('ReactFabricHostComponent', () => {
// eslint-disable-next-line no-new
new ReactFabricHostComponent(tag, viewConfig, internalInstanceHandle);
})
.verify(([modernImplResults, legacyImplResults]) => {
const minMedian = Math.min(
nullthrows(modernImplResults.latency.p50),
nullthrows(legacyImplResults.latency.p50),
);
const maxMedian = Math.max(
nullthrows(modernImplResults.latency.p50),
nullthrows(legacyImplResults.latency.p50),
);
const medianDifferencePercent = ((maxMedian - minMedian) / minMedian) * 100;
console.log(
`Difference in p50 values between ReactFabricHostComponent and ReactNativeElement is ${medianDifferencePercent.toFixed(2)}%`,
);
// No implementation should be more than 25% slower than the other.
expect(medianDifferencePercent).toBeLessThan(25);
});