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

GitHub Actions Test Results Accuracy Issue #22

Closed
DK96-OS opened this issue Jul 6, 2021 · 2 comments
Closed

GitHub Actions Test Results Accuracy Issue #22

DK96-OS opened this issue Jul 6, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@DK96-OS
Copy link
Owner

DK96-OS commented Jul 6, 2021

Performance testing using Kotlin's built in measureNanoTime function provides highly accurate and reliable time measurements for blocks of code.
This has been demonstrated offline using OpenJDK 11, however it appears that on GitHub, the measureNanoTime function returns values that are multiples of 100, or 0.
TestTargetedAccessJuly6_2021_12_25
Table 1: TargetedAccess Test Measurements The most recent GitHub Actions Test report for PrimeCachePerformanceTest, showing the TargetedAccess Test output.
This occurs in both Java 8 and Java 11 Test Reports.

Implications

Without a common reliable computing resource, reproducibility is a challenge. Comparing results between changes over time will require consideration of the system running the tests, which unfortunately will not be GitHub.

Potential Resolutions

One way that this could be resolved, is to investigate alternative OpenJDK distributions available in GitHub Actions. Another is to try to use a newer version of OpenJDK.

Originally posted by @DK96-OS in #21 (comment)

@DK96-OS
Copy link
Owner Author

DK96-OS commented Jul 12, 2021

Unless there is another method besides measureNanoTime that can record time measurements to nanosecond accuracy, the only option remaining is to perform each operation 100x.

One issue with this approach is that the operation itself is not isolated, the cache must be cleared between each operation which may affect the result. To work around this, the Cache can be instantiated 100x, and each cache can be accessed in sequence during the measurement. This would isolate the operation, and enable the cache clearing to be performed post-measurement.

@DK96-OS DK96-OS added the bug Something isn't working label Jul 12, 2021
@DK96-OS DK96-OS self-assigned this Jul 12, 2021
@DK96-OS
Copy link
Owner Author

DK96-OS commented May 22, 2022

@DK96-OS DK96-OS closed this as completed Jun 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant