-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add perf tests #383
Add perf tests #383
Conversation
Signed-off-by: Emanuele Feliziani <[email protected]>
Signed-off-by: Emanuele Feliziani <[email protected]>
Signed-off-by: Emanuele Feliziani <[email protected]>
Signed-off-by: Emanuele Feliziani <[email protected]>
Signed-off-by: Emanuele Feliziani <[email protected]>
for (let [keyName, value] of Object.entries(constants)) { | ||
output = output.replace(new RegExp(`${keyName}: \\d+`), `${keyName}: ${value}`) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're manipulating the source code with string substitution. A bit brutal but does the job. What's your thought on moving this to the remote config, so we can tweak it remotely if needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, I think better remote config integration is a must (as I've mentioned before given the advancements in C-S-S with this stuff)
But for this PR we shouldn't block on it. we do lots of replacements elsewhere and this is just for testing purposes so I see no issue.
Let's have a separate conversation about simplifying our 'Settings' class, now that we've been using it loads and we know what we do/don't need from it.
|
||
// we only care about the first one (for now) | ||
const entry = entries[0] | ||
console.log(`🏎💨 initial scan took: ${Math.round(entry.duration)}ms`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fancy emoji log helps with debugging, especially in CI (has already proven useful).
|
||
/** | ||
* Tests for various Bitwarden scenarios on macos | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've moved all the bitwarden stuff to a separate file to speed up the test suite. Here we have slow tests (because of timeouts) so moving it to a separate file speeds everything up (other tests can run in parallel).
const perfPage = scannerPerf(page) | ||
perfPage.navigate('pages/usps_signup.html') | ||
|
||
perfPage.validateInitialScanPerf(200) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These have some buffer to ensure they pass in CI.
Signed-off-by: Emanuele Feliziani <[email protected]>
@@ -22,6 +22,7 @@ const config = { | |||
*/ | |||
timeout: 5000 | |||
}, | |||
fullyParallel: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice little setting to speed up local test execution 🎉.
for (let [keyName, value] of Object.entries(constants)) { | ||
output = output.replace(new RegExp(`${keyName}: \\d+`), `${keyName}: ${value}`) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, I think better remote config integration is a must (as I've mentioned before given the advancements in C-S-S with this stuff)
But for this PR we shouldn't block on it. we do lots of replacements elsewhere and this is just for testing purposes so I see no issue.
Let's have a separate conversation about simplifying our 'Settings' class, now that we've been using it loads and we know what we do/don't need from it.
Task/Issue URL: https://app.asana.com/0/1205602928782192/1205602928782192 Autofill Release: https://github.com/duckduckgo/duckduckgo-autofill/releases/tag/8.4.1 BSK PR: duckduckgo/BrowserServicesKit#517 ## Description Updates Autofill to version [8.4.1](https://github.com/duckduckgo/duckduckgo-autofill/releases/tag/8.4.1). ### Autofill 8.4.1 release notes ## What's Changed * Precompile regexes by @GioSensation in duckduckgo/duckduckgo-autofill#382 * Add perf tests by @GioSensation in duckduckgo/duckduckgo-autofill#383 * deps: remove deprecated content-scope-utils by @shakyShane in duckduckgo/duckduckgo-autofill#384 * Update dependencies by @GioSensation in duckduckgo/duckduckgo-autofill#368 * Fix perf regressions by @GioSensation in duckduckgo/duckduckgo-autofill#385 **Full Changelog**: duckduckgo/duckduckgo-autofill@8.4.0...8.4.1 ## Steps to test This release has been tested during autofill development. For smoke test steps see [this task](https://app.asana.com/0/1198964220583541/1200583647142330/f). --------- Co-authored-by: GioSensation <[email protected]> Co-authored-by: Chris Brind <[email protected]>
Reviewer: @shakyShane
Asana: https://app.asana.com/0/0/1205509987156724/f
Description
Add performance testing.
Steps to test
Let CI do its thing 🙂.