Skip to content

Fix Flow types for performance.measure #52431

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

rubennorte
Copy link
Contributor

Summary:
Changelog: [internal]

performance.measure supports passing mark names as start and end options, so this fixes the Flow type before fixing the actual implementation.

It also makes it so you can't specify both end and duration, enforced by the type system.

Differential Revision: D77795991

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels Jul 4, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D77795991

rubennorte added a commit to rubennorte/react-native that referenced this pull request Jul 4, 2025
Summary:

Changelog: [internal]

`performance.measure` supports passing mark names as `start` and `end` options, so this fixes the Flow type before fixing the actual implementation.

It also makes it so you can't specify both `end` and `duration`, enforced by the type system.

Reviewed By: huntie

Differential Revision: D77795991
rubennorte added a commit to rubennorte/react-native that referenced this pull request Jul 4, 2025
Summary:

Changelog: [internal]

`performance.measure` supports passing mark names as `start` and `end` options, so this fixes the Flow type before fixing the actual implementation.

It also makes it so you can't specify both `end` and `duration`, enforced by the type system.

Reviewed By: huntie

Differential Revision: D77795991
…acebook#52432)

Summary:

Changelog: [internal]

This creates a battery of tests for `performance.mark` and `performance.measure`. For this, it was necessary to add a new method in the native module to mock the current time.

Many of the tests are currently failing, as the API doesn't support all the options or behaviors defined in the spec. They're skipped here and will be re-enabled and fixed in a following diff.

Reviewed By: huntie

Differential Revision: D77795989
Summary:

Changelog: [internal]

`performance.measure` supports passing mark names as `start` and `end` options, so this fixes the Flow type before fixing the actual implementation.

It also makes it so you can't specify both `end` and `duration`, enforced by the type system.

Reviewed By: huntie

Differential Revision: D77795991
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D77795991

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants