Skip to content
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

Parameterization type fixes; use parameters instad of arms where appropriate #2780

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

Conversation

esantorella
Copy link
Contributor

Summary:
Sometimes benchmarking code creates Arms from parameters just so they can be passed to a function that expects an Arm but only uses its parameters. This is silly. It's better to just have the function expect parameters.

Also updated some method signatures to use Mapping to indicate that they do not mutate the parameterization, which unfortunately creates the need for Pyre-fixmes if they are passed to a function or class such as Arm that does not annotate its arguments as immutable.

Differential Revision: D63327381

Summary:
* Loop over six cases instead of repeating code
* Have a mock wrap the original function so the original function still gets called

Differential Revision: D63326855
@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Sep 24, 2024
@facebook-github-bot
Copy link
Contributor

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

@codecov-commenter
Copy link

codecov-commenter commented Sep 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.68%. Comparing base (7a0ffb5) to head (0e857c5).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2780      +/-   ##
==========================================
- Coverage   95.68%   95.68%   -0.01%     
==========================================
  Files         488      488              
  Lines       47866    47842      -24     
==========================================
- Hits        45802    45778      -24     
  Misses       2064     2064              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

…opriate (facebook#2780)

Summary:
Pull Request resolved: facebook#2780

Sometimes benchmarking code creates Arms from parameters just so they can be passed to a function that expects an Arm but only uses its parameters. This is silly. It's better to just have the function expect parameters.

Also updated some method signatures to use `Mapping` to indicate that they do not mutate the parameterization, which unfortunately creates the need for Pyre-fixmes if they are passed to a function or class such as `Arm` that does not annotate its arguments as immutable.

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants