Skip to content

Add a test class to measure heap allocation level on a range of Maven commits #2

@jeanbisutti

Description

@jeanbisutti

Why

Today, MvnValidateAllocationByMaven3VersionTest can be used to evaluate the heap allocation level for a range of Maven distributions.
To more easily spot the changes (the commits) responsible for an allocation increase, we would like to have a test bench to measure the heap allocation level between two Maven commits.

Possible implementation

We could add commit.first.hash and commit.last.hash properties in the maven-bench.properties file.

The new test could execute the following steps:

  1. Clone Maven with the hash of the first commit
    You may execute Git commands with the help of a Java ProcessBuilder. A ProcessBuilder example can be found here.

  2. Build Maven
    mvn -DdistributionTargetDir="{location}/apache-maven-head" clean package
    You may execute this Maven command line from Java with the help of a MvnVerifier object (see MvnValidateAllocationByMaven3VersionTest) or with the help of a Java ProcessBuilder. A ProcessBuilder example can be found here.

  3. Measure heap allocation level in the same way it is done in MvnValidateAllocationByMaven3VersionTest

  4. Update the local repository of Maven with the next commit

  5. Build Maven

  6. Measure heap allocation

...

N) Update the local repository of Maven with the last commit
N+1) Build Maven
N+2) Measure heap allocation

Don't hesitate to leave a comment to discuss about this feature!

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions