Skip to content

fix: switch away from using "require" in benchmark used in tests#220

Merged
nolanmar511 merged 1 commit into
google:mainfrom
nolanmar511:busybench-js
Jun 8, 2022
Merged

fix: switch away from using "require" in benchmark used in tests#220
nolanmar511 merged 1 commit into
google:mainfrom
nolanmar511:busybench-js

Conversation

@nolanmar511
Copy link
Copy Markdown
Contributor

@nolanmar511 nolanmar511 commented Jun 7, 2022

Before ignoring busybench.js in the linter config, I got the following error after this change:

/usr/local/google/home/nolanmar/pprof-nodejs/system-test/busybench-js/src/busybench.js
  17:1  error  Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

I think since this file uses a separate package.json and contains a javascript file (and "gts" is meant to enforce typescript file), it seems reasonable to ignore it when running gts check for this repo.

Some additional changes were made along the way to make test easier to debug. I did run system_test.sh locally replacing the checks to confirm "busyLoop" appeared in the profile with checks for a different non-existent function and confirmed the test still failed.

@nolanmar511 nolanmar511 force-pushed the busybench-js branch 2 times, most recently from f64a737 to ab2343d Compare June 7, 2022 17:22
@nolanmar511 nolanmar511 changed the title fix: switch for using in javascript benchmark using in tests fix: switch away from using "require" in benchmark used in tests Jun 7, 2022
@nolanmar511 nolanmar511 force-pushed the busybench-js branch 7 times, most recently from 565647b to bc0e8ef Compare June 8, 2022 15:51
Copy link
Copy Markdown
Contributor

@amchiclet amchiclet left a comment

Choose a reason for hiding this comment

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

Thanks for making this change!

@nolanmar511 nolanmar511 merged commit 5ff430c into google:main Jun 8, 2022
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.

2 participants