JVMBenchmark evaluates the performance impact of code obfuscation on Java applications using JVM 17 and JDK 17. It helps developers balance security with potential performance trade-offs.
JVMBenchmark is a benchmarking tool developed to assess the performance implications of applying obfuscation techniques to Java applications. Built on JVM 17 and JDK 17, this project provides a suite of tests that measure various aspects of JVM performance before and after code obfuscation. Whether you’re a developer aiming to secure your code or a performance engineer looking to understand the cost of obfuscation, JVMBenchmark offers valuable insights.
Clone the Repository:
git clone https://github.com/yourusername/JVMBenchmark.git
cd JVMBenchmark
Build the Project:
Using Maven:
mvn clean install
Using Gradle:
gradle build
Configure Your Obfuscator:
Set up your preferred obfuscation tool and configure it according to your project’s requirements.
Run Baseline Tests:
Execute the test suite without applying obfuscation to gather baseline performance metrics.
java -jar JVMBenchmark.jar --mode baseline
Apply Obfuscation:
Obfuscate your Java application using your chosen obfuscation tool.
Run Obfuscated Tests:
Execute the test suite on the obfuscated code to measure performance changes.
java -jar JVMBenchmark.jar --mode obfuscated
Compare Results:
Analyze the generated reports to identify performance impacts caused by obfuscation.
JVMBenchmark includes a variety of tests categorized as follows:
Data Structure Tests
HashTableTest
Sorting Tests
SortTest
Garbage Collection Tests
GCTest
RealTimeGarbageCollectionTest
GarbageCollectorComparisonTest
Class Loading & Unloading Tests
ClassLoadingTest
ClassUnloadingTest
JIT Compilation Tests
JITCompilationTest
JITCompilerOptimizationTest
StartupAndJITWarmupTest
Language Feature Tests
PatternMatchingTest
RecordsTest
SealedClassesTest
LambdaTest
IndyTest
Reflection & Dynamic Proxy Tests
ReflectionTest
DynamicProxyTest
ReflectionAndDynamicProxyTest
Thread & Concurrency Tests
ThreadCreationTest
SynchronizationTest
ThreadPoolTest
ThreadLocalTest
Object & Memory Management Tests
ObjectCreationTest
EscapeAnalysisTest
MemoryUsageTest
String & Text Operations Tests
StringOperationsTest
TextParsingTest
StringInterningTest
Stream Operations Tests
SequentialStreamTest
ParallelStreamTest
StreamOperationsChainTest
Serialization Tests
JavaSerializationTest
Exception Handling Tests
ExceptionHandlingTest
Cache Efficiency Tests
CacheEfficiencyTest
Code Analysis & Instrumentation Overhead Tests
CodeAnalysisInstrumentationOverheadTest
We welcome contributions from the community! Whether it’s adding new tests, improving documentation, or reporting issues, your input is valuable.
Fork the Repository
Create a Feature Branch
git checkout -b feature/YourFeature
Commit Your Changes
Push to the Branch
git push origin feature/YourFeature
Open a Pull Request
Please ensure your code adheres to the project’s coding standards and includes relevant tests.
This project is licensed under the MIT License.
For any questions or suggestions, feel free to open an issue or contact [email protected].
Happy Benchmarking! 🚀