Automated Generation, Evaluation, and Enhancement of JMH Microbenchmark Suites from Unit Tests

dc.contributor.authorJANGALI, MOSTAFA
dc.date.accessioned2025-02-03T13:55:00Z
dc.date.available2025-02-03T13:55:00Z
dc.date.issued2025-02-03
dc.date.submitted2025-01-30
dc.description.abstractEnsuring the performance of software systems is a cornerstone of modern software engineering, directly influencing user satisfaction and reliability. Despite its critical role, performance testing remains resource-intensive and difficult to scale, particularly in large projects, due to the complexity of microbenchmark creation and execution. Microbenchmarking frameworks like the Java Microbenchmark Harness (JMH) offer precise performance insights but require significant expertise, limiting their adoption. This thesis addresses these challenges by introducing ju2jmh, a novel framework that automates the transformation of JUnit tests into JMH microbenchmarks, bridging the gap between functional and performance testing. The contributions of this thesis are threefold. First, ju2jmh automates the generation of high-quality JMH microbenchmarks from widely used JUnit test suites, enabling developers to adopt performance microbenchmarking with minimal manual effort. Results demonstrate that the generated microbenchmarks exhibit stability comparable to manually crafted ones and effectively detect real-world performance bugs. Second, the Performance Mutation Testing (PMT) framework is developed to systematically evaluate the robustness of microbenchmarks in detecting artificial performance bugs, achieving competitive mutation scores. Third, a clustering approach is proposed to optimize the execution of microbenchmarks by grouping functionally similar tests based on code coverage information. This strategy reduces execution time by 81.2% to 86.2% across three large-scale projects while preserving accuracy and reliability. Evaluated on three diverse open-source Java projects, the proposed solutions address stability, detection capabilities, and scalability challenges in performance testing workflows. The findings highlight the potential of ju2jmh and its associated methodologies to transform performance microbenchmarking practices, providing developers with practical tools to integrate reliable and efficient performance testing into modern software development pipelines. These advancements pave the way for future research into extending automated performance testing across different programming languages and development ecosystems.
dc.identifier.urihttps://hdl.handle.net/10012/21452
dc.language.isoen
dc.pendingfalse
dc.publisherUniversity of Waterlooen
dc.titleAutomated Generation, Evaluation, and Enhancement of JMH Microbenchmark Suites from Unit Tests
dc.typeMaster Thesis
uws-etd.degreeMaster of Applied Science
uws-etd.degree.departmentElectrical and Computer Engineering
uws-etd.degree.disciplineElectrical and Computer Engineering
uws-etd.degree.grantorUniversity of Waterlooen
uws-etd.embargo.terms0
uws.contributor.advisorSHANG, WEIYI
uws.contributor.affiliation1Faculty of Engineering
uws.peerReviewStatusUnrevieweden
uws.published.cityWaterlooen
uws.published.countryCanadaen
uws.published.provinceOntarioen
uws.scholarLevelGraduateen
uws.typeOfResourceTexten

Files

Original bundle

Now showing 1 - 1 of 1
No Thumbnail Available
Name:
JANGALI_MOSTAFA.pdf
Size:
1.41 MB
Format:
Adobe Portable Document Format

License bundle

Now showing 1 - 1 of 1
No Thumbnail Available
Name:
license.txt
Size:
6.4 KB
Format:
Item-specific license agreed upon to submission
Description:

Collections