Skip to content
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

chore: parallel test and build #7093

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Mar 12, 2024

  1. chore(labs): improve build and test speed

    This changeset optimizes the Guava build significantly by enabling
    parallel build and test features supported by Maven. With these
    flags enabled, only a few tests exhibit flaky behavior; applying a
    sensible count of test retries (3) solves the problem.
    
    As a result, the testsuite can now be executed often, because it
    takes about 2 minutes to run. Building is also much faster. After
    benchmarking different configurations, 2-threads-per-core and
    2-test-forks-per-core seems optimal:
    
    ```
    [INFO] Guava Maven Parent ..................... SUCCESS [  0.121 s]
    [INFO] Guava: Google Core Libraries for Java .. SUCCESS [  9.681 s]
    [INFO] Guava BOM .............................. SUCCESS [  0.120 s]
    [INFO] Guava Testing Library .................. SUCCESS [ 47.883 s]
    [INFO] Guava Unit Tests ....................... SUCCESS [01:57 min]  <--
    [INFO] Guava GWT compatible libs .............. SUCCESS [  6.909 s]
    ```
    
    When built and executed serially:
    ```
    [INFO] Guava Maven Parent ..................... SUCCESS [  0.129 s]
    [INFO] Guava: Google Core Libraries for Java .. SUCCESS [ 15.653 s]
    [INFO] Guava BOM .............................. SUCCESS [  0.064 s]
    [INFO] Guava Testing Library .................. SUCCESS [01:26 min]
    [INFO] Guava Unit Tests ....................... SUCCESS [06:26 min] <--
    [INFO] Guava GWT compatible libs .............. SUCCESS [ 11.092 s]
    ```
    
    Benchmark hardware:
    - Apple M2 Max, 96GB RAM
    - macOS Sonoma 14.3.1
    - GraalVM CE JVM 21.0.2
    
    ```
    openjdk version "21.0.2" 2024-01-16
    OpenJDK Runtime Environment GraalVM CE 21.0.2+13.1 (build 21.0.2+13-jvmci-23.1-b30)
    OpenJDK 64-Bit Server VM GraalVM CE 21.0.2+13.1 (build 21.0.2+13-jvmci-23.1-b30, mixed mode, sharing)
    ```
    
    - chore: enable parallel build
    - chore: enable parallel test execution
    - chore: enable parallel gc for maven
    - chore: tune tiered compilation for maven
    - chore: tune thread count for maven
    - fix: enable test retries (max = 3) for parallel-flaky tests
    
    Signed-off-by: Sam Gammon <sam@elide.ventures>
    sgammon committed Mar 12, 2024
    Configuration menu
    Copy the full SHA
    e946f2b View commit details
    Browse the repository at this point in the history