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

Parse data from TRSS url #579

Merged
merged 1 commit into from
Jul 23, 2024
Merged

Conversation

annaibm
Copy link
Contributor

@annaibm annaibm commented Jul 4, 2024

  • TKG Parse data from TRSS url

related:#558

@annaibm annaibm force-pushed the addRedirect branch 2 times, most recently from 39f5e71 to 9db2ee5 Compare July 22, 2024 16:44
@annaibm
Copy link
Contributor Author

annaibm commented Jul 22, 2024

Grinder links:
TARGET: sanity.functional
mac:
https://hyc-runtimes-jenkins.swg-devops.com/job/Grinder/42270/
win:
https://hyc-runtimes-jenkins.swg-devops.com/job/Grinder/42271/
aarch64_linux:
https://hyc-runtimes-jenkins.swg-devops.com/job/Grinder/42272/console
s390x_linux:
https://hyc-runtimes-jenkins.swg-devops.com/job/Grinder/42268/

Attempting to get test duration data from TRSS.
12:31:40  curl --silent --max-time 120 -L -k https://trssrtp1.fyre.ibm.com/api/getTestAvgDuration?limit=10&jdkVersion=11&impl=j9&platform=s390x_linux&group=functional&level=sanity -o /home/jenkins/workspace/Grinder/aqa-tests/TKG/response.json
12:31:45  Response data written to file: /home/jenkins/workspace/Grinder/aqa-tests/TKG/response.json
12:31:45  Response Data: {"testListTime":[15134729.416666664],"testLists":[[{"_id":"cmdLineTester_criu_nonPortableRestore_10","avgDuration":2045327.3333333333},{"_id":"testJITServer_2","avgDuration":812512.6666666666},{"_id":"testJITServer_1","avgDuration":704608.6666666666},{"_id":"testJITServer_0","avgDuration":703974.3333333334},{"_id":"cmdLineTester_criu_nonPortableRestore_3","avgDuration":297062},{"_id":"cmdLineTester_criu_nonPortableRestore_4","avgDuration":281803.3333333333},{"_id":"cmdLineTester_GCRegressionTests_3","avgDuration":277104.3333333333},{"_id":"cmdLineTester_GCRegressionTests_2","avgDuration":266454.3333333333},{"_id":"cmdLineTester_GCRegressionTests_1","avgDuration":264064.3333333333},{"_id":"cmdLineTester_GCRegressionTests_0","avgDuration":263644},{"_id":"cmdLineTester_criu_nonPortableRestore_9","avgDuration":235436},{"_id":"cmdLineTester_criu_nonPortableRestore_7","avgDuration":220314.33333333334},{"_id":"cmdLineTester_criu_nonPortableRestore_0","avgDuration":207269.33333333334},{"_id":"cmdLineTester_criu_nonPortableRestore_2","avgDuration":198845},{"_id":"cmdLineTester_criu_nonPortableRestore_5","avgDuration":198723.66666666666},

command = "cmd.exe /c curl --silent --max-time 120 -L -k \"" + URL + "\" -o " + responseFilePath;
} else {
command = "curl --silent --max-time 120 -L -k "+ URL + " -o " + responseFilePath;
}
Copy link
Contributor

@llxia llxia Jul 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A file is suggested to debug the problem. We should try to avoid using it in the fix if possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have removed the use of the file response.json in the code as suggested.
Grinder links:
TARGET: sanity.functional
mac:
42294
win:
42295
aarch64_linux:
#42296
s390x_linux:
#42292

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @annaibm . It looks like the fix is to add quotes around URL. Do we need the following changes (L244 - L319)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have removed changes from (L244 - L319) . The fix for constructing the curl command based on the operating system . Added quotes around the URL for Windows, while no quotes are used for Linux. Also added the -k option in the curl command.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@annaibm annaibm requested a review from llxia July 22, 2024 20:08
@annaibm annaibm force-pushed the addRedirect branch 3 times, most recently from 7230d24 to 5d6a876 Compare July 23, 2024 19:01
@annaibm annaibm marked this pull request as ready for review July 23, 2024 19:02
@@ -238,7 +246,7 @@ private Map<String, Integer> getDataFromTRSS() {
}
try (InputStream responseStream = process.getInputStream();
Reader responseReader = new BufferedReader(new InputStreamReader(responseStream))) {
parseDuration(responseReader, map);
parseDuration(responseReader, map);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you remove the extra tab?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the tab.

- TKG Parse data from TRSS url

related:adoptium#558

Signed-off-by: Anna Babu Palathingal <anna.bp@ibm.com>
Copy link
Contributor

@llxia llxia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@llxia llxia requested a review from LongyuZhang July 23, 2024 19:23
Copy link
Contributor

@LongyuZhang LongyuZhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @annaibm !

@LongyuZhang LongyuZhang merged commit 8a5ae9e into adoptium:master Jul 23, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants