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

Subtract out gc time? #60

Open
DaveBarton opened this issue Jul 22, 2024 · 4 comments
Open

Subtract out gc time? #60

DaveBarton opened this issue Jul 22, 2024 · 4 comments

Comments

@DaveBarton
Copy link

Would it help to subtract out the gc time, at least optionally? E.g. instead of just using getCPUTime, use mutator_cpu_ns and mutator_elapsed_ns:

import GHC.Stats (RTSStats, getRTSStats, getRTSStatsEnabled, mutator_cpu_ns, mutator_elapsed_ns)
import System.CPUTime (getCPUTime)

@Bodigrim
Copy link
Owner

I'm open to extend TimeMode with more options.

@Bodigrim
Copy link
Owner

Let me transfer the issue to tasty-bench repo, because extending TimeMode is a prerequisite for tasty-bench-fit to get other flavours.

@Bodigrim Bodigrim transferred this issue from Bodigrim/tasty-bench-fit Jul 28, 2024
@Bodigrim
Copy link
Owner

It is easy to extend TimeMode with additional constructors, but it is technically a breaking change, and we just bumped the major version not that long ago.

I can imagine us adding more and more TimeModes over the time, I'd like us to have a strategy to avoid breakage. Maybe hide the actual constructors and provide only a set of pattern synonyms?..

@DaveBarton
Copy link
Author

I don't need this immediately & I don't have time to work on details now (will be busy with my paying job for a while, sadly). I mostly meant it as a design question for tasty-bench-fit, since it seemed the biggest problem with that is inconsistent results due to gc. If that's the case, would subtracting out gc time improve the usefulness of tasty-bench-fit significantly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants