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
8269827: JMH tests for AES/GCM byte[] and bytebuffers #4672
Conversation
|
@ascarpino The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
Webrevs
|
@Param({"128"}) | ||
private int keyLength; | ||
|
||
@Param({""+16*1024}) | ||
@Param({"" + 1024, "" + 1500, "" + 4096, "" + 16384}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that you don't calculate anymore, how about just string literals like "1024"
etc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Funny.. I didn't even notice that
* This test rotates the IV and creates a new GCMParameterSpec for each encrypt | ||
* benchmark operation | ||
*/ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to create a "small" version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I debated it.. I'm still not sure, but I guess I could.
private Cipher encryptCipher; | ||
private Cipher decryptCipher; | ||
SecretKeySpec ks; | ||
GCMParameterSpec gcm_spec; | ||
byte[] aad; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not an expert on this, but why no more AAD?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For a performance test there isn't any value in adding an AAD. It's data sitting in a buffer that an be easily replicated with a multipart operation
From the JMH point of view, looks good to me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the JMH point of view, looks good to me.
@Param({"128"}) | ||
private int keyLength; | ||
|
||
@Param({"" + 1024, "" + 1500, "" + 4096, "" + 16384}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can update the line above as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Grr.. I'm not sure how I missed that one
@ascarpino This change now passes all automated pre-integration checks. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 447 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.
|
/integrate |
Going to push as commit 5832882.
Your commit was automatically rebased without conflicts. |
@ascarpino Pushed as commit 5832882. |
Hi,
I need a review of these new jmh tests that run AES/GCM encryption and decryption using byte[], heap bytebuffers, and direct bytebuffers as input and output buffers for single and multi-part testing.
thanks
Tony
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/4672/head:pull/4672
$ git checkout pull/4672
Update a local copy of the PR:
$ git checkout pull/4672
$ git pull https://git.openjdk.java.net/jdk pull/4672/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 4672
View PR using the GUI difftool:
$ git pr show -t 4672
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/4672.diff