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

Add threshold configuration to FactoryProf #290

Closed
palkan opened this issue May 4, 2024 · 0 comments · Fixed by #294
Closed

Add threshold configuration to FactoryProf #290

palkan opened this issue May 4, 2024 · 0 comments · Fixed by #294
Labels
good first issue hackday RailsConf Hack Day challenges

Comments

@palkan
Copy link
Collaborator

palkan commented May 4, 2024

Context

When running FactoryProf (FPROF=1), the output may contain a lot of lines for factories that has been used a few times, thus, making it harder to quickly identify overused factories.

We can safely exclude rarely used factories from the output without sacrificing the value of the profile.

TODO

Let's add a configuration parameter to FactoryProf, threshold, which would be used in the profile printer to ignore factories which total number of calls is less than the provided threshold.

It should be possible to set the threshold value via Ruby or env vars (FPROF_THRESHOLD=N).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue hackday RailsConf Hack Day challenges
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant