mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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:
committed by
Facebook GitHub Bot
parent
bb6bbfc261
commit
deea42329e
-19
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user