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

Extract Short JDK Name #1144

Closed
piyush286 opened this issue May 21, 2019 · 3 comments
Closed

Extract Short JDK Name #1144

piyush286 opened this issue May 21, 2019 · 3 comments
Labels
Projects
Milestone

Comments

@piyush286
Copy link
Contributor

Problem Description

Currently, we don't extract the JDK name while downloading a JDK in getBinaryOpenjdk() in get.sh as shown below.

https://github.com/AdoptOpenJDK/openjdk-tests/blob/4865e8d913fb4f4a43307e6d8cfd400946ca0dc9/get.sh#L138-L188

This one line info is pretty handy for displaying benchmark results since it doesn't take space for storing and can be easily used for querying data from the database for a build, without requiring to search multiple times for a specific build.

This one line product info is also expected by the Test Result Summary Service for parsing and storing benchmark results for different builds as shown below.

https://github.com/AdoptOpenJDK/openjdk-test-tools/blob/858993efb7e454786dba984856ed454e3290bd26/TestResultSummaryService/parsers/BenchmarkParser.js#L8

While we do print the java version, it doesn't have the summarized info of the java stream, bit, platform, java implementation and date in one line. In fact, java version could be missing some info such as the platform info in the HotSpot java version as shown below.

Example for OpenJ9 Java Version

16:01:38  curl -OLJks --retry 5 --retry-delay 300  https://api.adoptopenjdk.net/v2/binary/nightly/openjdk8?openjdk_impl=openj9&os=linux&arch=x64&release=latest&type=jdk&heap_size=normal
16:01:49  unzip file: OpenJDK8U-jdk_x64_linux_openj9_2019-05-21-11-05.tar.gz ...
16:01:51  Run /home/jenkins/workspace/Grinder/openjdkbinary/j2sdk-image/bin/java -version
16:01:52  openjdk version "1.8.0_222"
16:01:52  OpenJDK Runtime Environment (build 1.8.0_222-201905180358-b02)
16:01:52  Eclipse OpenJ9 VM (build master-72a537c81, JRE 1.8.0 Linux amd64-64-Bit Compressed References 20190518_311 (JIT enabled, AOT enabled)
16:01:52  OpenJ9   - 72a537c81
16:01:52  OMR      - 3172276c
16:01:52  JCL      - 7b46afb743 based on jdk8u222-b02)

Example for HotSpot Java Version

13:56:37  curl -OLJks --retry 5 --retry-delay 300  https://api.adoptopenjdk.net/v2/binary/nightly/openjdk8?openjdk_impl=hotspot&os=linux&arch=x64&release=latest&type=jdk&heap_size=normal
13:56:47  unzip file: OpenJDK8U-jdk_x64_linux_hotspot_2019-05-21-11-05.tar.gz ...
13:56:48  Run /home/jenkins/workspace/Piyush-Grinder/openjdkbinary/j2sdk-image/bin/java -version
13:56:48  openjdk version "1.8.0_212"
13:56:48  OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_212-201905180333-b03)
13:56:48  OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.212-b03, mixed mode)

Proposed Changes

We should extract the name from the downloaded binary and export it so that it's available for use in benchmark scripts and other places if needed.

For example, if we download OpenJDK8U-jdk_x64_linux_openj9_2019-05-21-11-05.tar.gz, then we should extract OpenJDK8U-jdk_x64_linux_openj9_2019-05-21-11-05.

Similarly, OpenJDK8U-jdk_x64_linux_hotspot_2019-05-21-11-05.tar.gz should give OpenJDK8U-jdk_x64_linux_hotspot_2019-05-21-11-05.

@karianna karianna added this to TODO in aqa-tests via automation May 21, 2019
@karianna karianna added the bug label May 21, 2019
@llxia
Copy link
Contributor

llxia commented May 24, 2019

I think it is not a good idea to rely on the file name to determine SDK information such as java stream, platform, java implementation and date, etc. A filename may not have accurate information and it can be modified easily. Different sites are highly likely to have a different naming convention.

For example, the file generated from Openj9 is named OpenJ9-JDK11-ppc64le_linux-20190524-022309.tar.gz

@piyush286
Copy link
Contributor Author

Yeah I do agree that the names could be different unless we're always pulling our builds from one place which might be consistently be sticking to one naming convention.

Anyway, I guess we can decide our own convention and use that to generate this short JDK name instead of parsing that info from the archive file name.

piyush286 added a commit to piyush286/openjdk-test-tools that referenced this issue Sep 11, 2019
Related to adoptium#136 adoptium/aqa-tests#1144 adoptium#37

Tabular View Changes
	- Enabled the setting of JDK date (i.e. benchmarkProduct) to be dynamic instead of expecting the launch agents such as PerfNext or TestKitGen to set it.
		○ JDK date is used on Tabular View to show the data of latest baseline and test builds before that JDK date.
	- Updated the Tabular View query for fetching unique build names, sdk resource and build servers, options that are displayed for choosing desired baseline or test builds for comparison
		○ Query didn't have the correct SDK resource location.
	- Resolved the issue of Tabular View incorrectly setting states for dropdown options
	- Fixed the Tabular View query for getting the filtered data by updating the SDK resource location

Benchmark Parser Changes
	- Enable the parsing of some benchmarks such Liberty under Adopt openjdk-tests repo to be parsed by TRSS. This design to be extended further in future PRs to allow parsing of other benchmarks as well.
	- Simplied perf parser regexes to get various benchmark info such as benchmark name, variant and JDK info
		○ Removed some constraints so that all info can be parsed without being affected by Jenkins timestamps
	- Updated the Java version regex for Open builds
	- Added extra regex check for parent builds in order to avoid TRSS from considering a perf build from Adopt as a test build. Example of an Adopt perf pipeline name (https://ci.adoptopenjdk.net/view/Test_perf/): Test_openjdk8_j9_sanity.perf_x86-64_linux.
	- Enabled parsing for ODM 300 Ruleset

Signed-off-by: Piyush Gupta <piyush286@gmail.com>
piyush286 added a commit to piyush286/openjdk-test-tools that referenced this issue Sep 16, 2019
Related to adoptium#136 adoptium/aqa-tests#1144 adoptium#37

Tabular View Changes
	- Enabled the setting of JDK date (i.e. benchmarkProduct) to be dynamic instead of expecting the launch agents such as PerfNext or TestKitGen to set it.
		○ JDK date is used on Tabular View to show the data of latest baseline and test builds before that JDK date.
	- Updated the Tabular View query for fetching unique build names, sdk resource and build servers, options that are displayed for choosing desired baseline or test builds for comparison
		○ Query didn't have the correct SDK resource location.
	- Resolved the issue of Tabular View incorrectly setting states for dropdown options
	- Fixed the Tabular View query for getting the filtered data by updating the SDK resource location

Benchmark Parser Changes
	- Enable the parsing of some benchmarks such Liberty under Adopt openjdk-tests repo to be parsed by TRSS. This design to be extended further in future PRs to allow parsing of other benchmarks as well.
	- Simplied perf parser regexes to get various benchmark info such as benchmark name, variant and JDK info
		○ Removed some constraints so that all info can be parsed without being affected by Jenkins timestamps
	- Updated the Java version regex for Open builds
	- Enabled parsing for ODM 300 Ruleset

Signed-off-by: Piyush Gupta <piyush286@gmail.com>
piyush286 added a commit to piyush286/openjdk-test-tools that referenced this issue Sep 18, 2019
Related to adoptium#136 adoptium/aqa-tests#1144 adoptium#37

Tabular View Changes
	- Enabled the setting of JDK date (i.e. benchmarkProduct) to be dynamic instead of expecting the launch agents such as PerfNext or TestKitGen to set it.
		○ JDK date is used on Tabular View to show the data of latest baseline and test builds before that JDK date.
	- Updated the Tabular View query for fetching unique build names, sdk resource and build servers, options that are displayed for choosing desired baseline or test builds for comparison
		○ Query didn't have the correct SDK resource location.
	- Resolved the issue of Tabular View incorrectly setting states for dropdown options
	- Fixed the Tabular View query for getting the filtered data by updating the SDK resource location

Benchmark Parser Changes
	- Enable the parsing of some benchmarks such Liberty under Adopt openjdk-tests repo to be parsed by TRSS. This design to be extended further in future PRs to allow parsing of other benchmarks as well.
	- Simplied perf parser regexes to get various benchmark info such as benchmark name, variant and JDK info
		○ Removed some constraints so that all info can be parsed without being affected by Jenkins timestamps
	- Updated the Java version regex for capture all kinds of JDK builds (IBM J9, Open J9, HotSpot, OpenJDK)
	- Moved `javaVersion` to higher common level in data structure
	- Updated Perf graph widgets to use `jdkDate` instead of `jdkBuildDateUnixTime`
	- Removed  `jdkBuildDateUnixTime` since it's redundant now as we're storing the jdk
	- Renamed `benchmarkProduct` to `jdkDate` to reflect the correct data that it's storing and updated the code in Data Manager, Perf Compare and Tabular View
	- Enabled parsing for ODM 300 Ruleset

Signed-off-by: Piyush Gupta <piyush286@gmail.com>
piyush286 added a commit to piyush286/openjdk-test-tools that referenced this issue Sep 19, 2019
Related to adoptium#136 adoptium/aqa-tests#1144 adoptium#37

Tabular View Changes
	- Enabled the setting of JDK date (i.e. benchmarkProduct) to be dynamic instead of expecting the launch agents such as PerfNext or TestKitGen to set it.
		○ JDK date is used on Tabular View to show the data of latest baseline and test builds before that JDK date.
	- Updated the Tabular View query for fetching unique build names, sdk resource and build servers, options that are displayed for choosing desired baseline or test builds for comparison
		○ Query didn't have the correct SDK resource location.
	- Resolved the issue of Tabular View incorrectly setting states for dropdown options
	- Fixed the Tabular View query for getting the filtered data by updating the SDK resource location

Benchmark Parser Changes
	- Enable the parsing of some benchmarks such Liberty under Adopt openjdk-tests repo to be parsed by TRSS. This design to be extended further in future PRs to allow parsing of other benchmarks as well.
	- Simplied perf parser regexes to get various benchmark info such as benchmark name, variant and JDK info
		○ Removed some constraints so that all info can be parsed without being affected by Jenkins timestamps
	- Updated the Java version regex for capture all kinds of JDK builds (IBM J9, Open J9, HotSpot, OpenJDK)
	- Moved `javaVersion` to higher common level in data structure
	- Updated Perf graph widgets to use `jdkDate` instead of `jdkBuildDateUnixTime`
	- Removed  `jdkBuildDateUnixTime` since it's redundant now as we're storing the jdk
	- Renamed `benchmarkProduct` to `jdkDate` to reflect the correct data that it's storing and updated the code in Data Manager, Perf Compare and Tabular View
	- Enabled parsing for ODM 300 Ruleset

Signed-off-by: Piyush Gupta <piyush286@gmail.com>
@piyush286
Copy link
Contributor Author

Closing this issue since we've added support to dynamically get the JDK version and date on TRSS, which can be used in various tools such as Tabular View and Perf Compare.

aqa-tests automation moved this from TODO to Done Dec 12, 2019
@karianna karianna added this to the December 2019 milestone Jan 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
aqa-tests
  
Done
Development

No branches or pull requests

3 participants