Skip to content

Runtime benchmarks infrastructure #7596

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

Merged
merged 21 commits into from
Dec 4, 2019
Merged

Runtime benchmarks infrastructure #7596

merged 21 commits into from
Dec 4, 2019

Conversation

brunnerant
Copy link
Contributor

This pull requests adds the sub-project dotty-bench-run that allows to make runtime benchmarks.
It is uses jmh, as dotty-bench does. There is also support for taking inputs from a file, which is useful because sometimes the inputs cannot be specified by a @Param clause.

This pull requests also adds a few benchmarks for the tuple related functions, which I have used for my semester project with @nicolasstucki .

Copy link
Contributor

@liufengyun liufengyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise, LGTM

}
}

def printUsage(): Unit = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to execute jmh:compile first?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it is necessary, at least I didn't do it and it worked. However, it might be necessary to run clean or even rm -rf out because sometimes the incremental compilation has a hard time figuring everything out...


val warmup = if (intArgs.length > 0) intArgs(0).toInt else 20
val iterations = if (intArgs.length > 1) intArgs(1).toInt else 20
val forks = if (intArgs.length > 2) intArgs(2).toInt else 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe define a local method:

def getIntArg(i: Int, default: Int): Int =
   if (intArgs.length > i) intArgs(i).toInt else default

@brunnerant
Copy link
Contributor Author

It is weird. I have signed the CLA about one month ago, but it seems like it was reset... I signed it again, so it should be fine now.

@nicolasstucki
Copy link
Contributor

nicolasstucki commented Nov 26, 2019 via email

@liufengyun
Copy link
Contributor

@brunnerant We need a rebase and then we can merge.

@brunnerant
Copy link
Contributor Author

Sorry, I forgot to do that earlier. Now it should be ready to merge...

@nicolasstucki
Copy link
Contributor

One of the tests failed

@nicolasstucki nicolasstucki merged commit 3a7dfd2 into scala:master Dec 4, 2019
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

Successfully merging this pull request may close these issues.

3 participants