aqa-test-tools icon indicating copy to clipboard operation
aqa-test-tools copied to clipboard

Delay Generation of HW Specific Variables

Open piyush286 opened this issue 6 years ago • 2 comments

Problem Description

Currently, we fetch the latest machine data file every time PerfNext is loaded. If some benchmark is selected and the machine data hasn't been fetched yet—fetching that can take a few seconds—then we can get an error while generating HW environment variables.

Error

image

parser.js: Entering generateHWENV()
/Users/piyush/Work/Git/openjdk-test-tools/PerfNext/app/apis/BenchEngine/parser.js:453
	    var envVar = HW_ENV[property].$.name;
	                                    ^

TypeError: Cannot read property 'name' of undefined
    at generateHWENV (/Users/piyush/Work/Git/openjdk-test-tools/PerfNext/app/apis/BenchEngine/parser.js:453:38)
    at /Users/piyush/Work/Git/openjdk-test-tools/PerfNext/app/apis/BenchEngine/parser.js:393:23
    at /Users/piyush/Work/Git/openjdk-test-tools/PerfNext/app/apis/BenchEngine/parser.js:423:9
    at FSReqWrap.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:53:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node app.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/piyush/.npm/_logs/2019-04-01T23_40_41_512Z-debug.log
Piyushs-MacBook-Pro:PerfNext piyush$

Related Snippets

Frontend: Call to Backend for Getting Machine List https://github.com/AdoptOpenJDK/openjdk-test-tools/blob/524d16e3784c17f4af6cee75f9105eb929397792/PerfNext/public/lib/js/benchmarks.js#L34-L40

Backend: Get machine list https://github.com/AdoptOpenJDK/openjdk-test-tools/blob/524d16e3784c17f4af6cee75f9105eb929397792/PerfNext/app/apis/machines.js#L7-L24

Snippet to Generate HW Specific Variables https://github.com/AdoptOpenJDK/openjdk-test-tools/blob/524d16e3784c17f4af6cee75f9105eb929397792/PerfNext/app/apis/BenchEngine/parser.js#L448-L460

Proposed Changes

We need to find a workaround to prevent this issue.

piyush286 avatar Jun 19 '19 19:06 piyush286

FYI @pinicman

piyush286 avatar Jun 19 '19 19:06 piyush286

@pinicman Whenever you get a chance, let's try to fix this issue.

piyush286 avatar Oct 21 '19 19:10 piyush286