Skip to content

Commit

Permalink
Remove verification function from ReactFabricPublicInstance benchmark (
Browse files Browse the repository at this point in the history
…#48588)

Summary:
Pull Request resolved: #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
  • Loading branch information
rubennorte authored and facebook-github-bot committed Jan 10, 2025
1 parent bb6bbfc commit deea423
Showing 1 changed file with 0 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
});

0 comments on commit deea423

Please sign in to comment.