-
Notifications
You must be signed in to change notification settings - Fork 22
feat: perf-test for java #815
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
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| # AWS Encryption SDK Java Benchmark | ||
|
|
||
| Performance testing suite for the AWS Encryption SDK Java implementation. | ||
|
|
||
| ## Quick Start | ||
|
|
||
| ```bash | ||
| # Build the project | ||
| mvn clean compile | ||
|
|
||
| # Run benchmark | ||
| mvn exec:java -Dexec.mainClass="com.amazon.esdk.benchmark.Program" | ||
|
|
||
| # Quick test (reduced iterations) | ||
| mvn exec:java -Dexec.mainClass="com.amazon.esdk.benchmark.Program" -Dexec.args="--quick" | ||
| ``` | ||
|
|
||
| ## Options | ||
|
|
||
| - `--config` - Path to test configuration file (default: `../../config/test-scenarios.yaml`) | ||
| - `--output` - Path to output results file (default: `../../results/raw-data/java_results.json`) | ||
| - `--quick` - Run with reduced iterations for faster testing | ||
|
|
||
| ## Configuration | ||
|
|
||
| Edit `../../config/test-scenarios.yaml` for test parameters: | ||
|
|
||
| - Data sizes (small/medium/large) | ||
| - Iterations and concurrency levels | ||
|
|
||
| ## Test Types | ||
|
|
||
| - **Throughput** - Measures encryption/decryption operations per second | ||
| - **Memory** - Tracks memory usage and allocations during operations | ||
| - **Concurrency** - Tests performance under concurrent load | ||
|
|
||
| ## Output | ||
|
|
||
| Results saved as JSON to `../../results/raw-data/java_results.json` with: | ||
|
|
||
| - Performance metrics (ops/sec, latency percentiles) | ||
| - Memory usage (peak, average, allocations, input data to memory ratio) | ||
| - System information (CPU, memory, Java version) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,120 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <project xmlns="http://maven.apache.org/POM/4.0.0" | ||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
| <modelVersion>4.0.0</modelVersion> | ||
|
|
||
| <groupId>com.amazon.esdk</groupId> | ||
| <artifactId>esdk-performance-benchmark</artifactId> | ||
| <version>1.0.0</version> | ||
| <packaging>jar</packaging> | ||
|
|
||
| <properties> | ||
| <maven.compiler.source>17</maven.compiler.source> | ||
| <maven.compiler.target>17</maven.compiler.target> | ||
| <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
| </properties> | ||
|
|
||
| <dependencies> | ||
| <!-- AWS Encryption SDK --> | ||
| <dependency> | ||
| <groupId>com.amazonaws</groupId> | ||
| <artifactId>aws-encryption-sdk-java</artifactId> | ||
| <version>3.0.2</version> | ||
| </dependency> | ||
|
|
||
| <!-- AWS Cryptographic Material Providers Library --> | ||
| <dependency> | ||
| <groupId>software.amazon.cryptography</groupId> | ||
| <artifactId>aws-cryptographic-material-providers</artifactId> | ||
| <version>1.11.0</version> | ||
| </dependency> | ||
|
|
||
| <!-- Jackson for YAML processing --> | ||
| <dependency> | ||
| <groupId>com.fasterxml.jackson.core</groupId> | ||
| <artifactId>jackson-databind</artifactId> | ||
| <version>2.15.2</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>com.fasterxml.jackson.dataformat</groupId> | ||
| <artifactId>jackson-dataformat-yaml</artifactId> | ||
| <version>2.15.2</version> | ||
| </dependency> | ||
|
|
||
| <!-- Progress bar --> | ||
| <dependency> | ||
| <groupId>me.tongfei</groupId> | ||
| <artifactId>progressbar</artifactId> | ||
| <version>0.9.5</version> | ||
| </dependency> | ||
|
|
||
| <!-- SLF4J for logging --> | ||
| <dependency> | ||
| <groupId>org.slf4j</groupId> | ||
| <artifactId>slf4j-simple</artifactId> | ||
| <version>2.0.7</version> | ||
| </dependency> | ||
| </dependencies> | ||
|
|
||
| <build> | ||
| <plugins> | ||
| <plugin> | ||
| <groupId>org.apache.maven.plugins</groupId> | ||
| <artifactId>maven-compiler-plugin</artifactId> | ||
| <version>3.11.0</version> | ||
| </plugin> | ||
|
|
||
| <plugin> | ||
| <groupId>org.apache.maven.plugins</groupId> | ||
| <artifactId>maven-shade-plugin</artifactId> | ||
| <version>3.5.0</version> | ||
| <executions> | ||
| <execution> | ||
| <phase>package</phase> | ||
| <goals> | ||
| <goal>shade</goal> | ||
| </goals> | ||
| <configuration> | ||
| <transformers> | ||
| <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> | ||
| <mainClass>com.amazon.esdk.benchmark.Program</mainClass> | ||
| </transformer> | ||
| </transformers> | ||
| <filters> | ||
| <filter> | ||
| <artifact>*:*</artifact> | ||
| <excludes> | ||
| <exclude>META-INF/*.SF</exclude> | ||
| <exclude>META-INF/*.DSA</exclude> | ||
| <exclude>META-INF/*.RSA</exclude> | ||
| </excludes> | ||
| </filter> | ||
| </filters> | ||
| </configuration> | ||
| </execution> | ||
| </executions> | ||
| </plugin> | ||
|
|
||
| <plugin> | ||
| <groupId>org.codehaus.mojo</groupId> | ||
| <artifactId>exec-maven-plugin</artifactId> | ||
| <version>3.1.0</version> | ||
| <configuration> | ||
| <mainClass>com.amazon.esdk.benchmark.Program</mainClass> | ||
| </configuration> | ||
| </plugin> | ||
|
|
||
| <plugin> | ||
| <groupId>com.diffplug.spotless</groupId> | ||
| <artifactId>spotless-maven-plugin</artifactId> | ||
| <version>2.40.0</version> | ||
| <configuration> | ||
| <java> | ||
| <googleJavaFormat /> | ||
| </java> | ||
| </configuration> | ||
| </plugin> | ||
| </plugins> | ||
| </build> | ||
| </project> | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Praise: I love a progress bar for any long running job.
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.
Fun fact: I had to spend the same amount of time on progress bar as much as I spent on memory sampling! Cause multi-threading, sys out i/o, and progress bar don't play nicely. So the love is mutual haha!