-
Notifications
You must be signed in to change notification settings - Fork 177
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
MWPW-163603 benchmark card rendering time in PR #3377
Conversation
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## stage #3377 +/- ##
=======================================
Coverage 96.46% 96.46%
=======================================
Files 255 255
Lines 59419 59430 +11
=======================================
+ Hits 57318 57329 +11
Misses 2101 2101 ☔ View full report in Codecov by Sentry. |
|
||
test.describe('Benchmark feature test suite', () => { | ||
test(`${features[0].name},${features[0].tags}`, async ({ page, baseURL }) => { | ||
const testPage = `${baseURL}${features[0].path}${miloLibs}`; |
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 do have a concern including this in Milo nala tests.
If freya or wcs cdn will be causing slower render it will fail Milo nala tests and block developers until someone will comment this test out.
We could try it out and if we trues in Freya/WCS stability it would work, however I think we should notify people so that they are aware about this test having external dependencies (it's ok for Nala tests)
And if this test will be flaky we will have to take it out and maybe run it only manually/before release.
We should make sure we don't create stress for Milo community with this
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 agree, this is why i added alignement with network capabilities. For the rest items should be cached, so this is CDN response time for constant time we are measuring and this should not change much.
I thought about not adding this systematically and/or raise acceptance bar, but i think this will defeat the purpose of us guaranteeing cards performances
@@ -0,0 +1,40 @@ | |||
import '../../../deps/custom-elements.js'; |
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.
maybe its better to place it in src
folder
and keep docs folder for html build artifacts
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.
actually no, src is for doc build, and docs is for built / as is artifacts, so it's at its place
import '../../spectrum-web-components/dist/action-button.js'; | ||
import '../../../features/spectrum-web-components/dist/button.js'; | ||
const init = () => { | ||
const ENVS = { |
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.
kudos on adding this, I would mention it in PR description
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 could yes, i didn't add it to ccd page and i should have, but i'm waiting for @yesil merge on spectrum css before to limit merge work
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.
Oh, I also have something similar but not common but will replace with this once before merge.
libs/features/mas/docs/common.js
Outdated
}); | ||
masCommerceService.setAttribute('host-env', 'prod'); | ||
masCommerceService.setAttribute('lana-tags', 'ccd'); | ||
masCommerceService.setAttribute('lana-sample-rate', '100'); // optional, default value is set to '1' |
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.
including this on every page would pollute our prod logs
ccd page is not throwing errors, but https://mwpw-163603--milo--npeltier.aem.page/libs/features/mas/docs/merch-card.html does
not sure its a big deal, but something worth mentioning
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.
(even if it's 9 views a week)
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.
all looks good, except one small thing:
https://mwpw-163603--milo--npeltier.aem.page/libs/features/mas/docs/benchmarks.html is not referenced from anywhere in documentation which makes it not possible to find
what i keep dreaming about is a sidenav with all our pages, but since its an extra effor it might be too much for this PR. just an idea.
at least please add a link somewhere in mas page.
This pull request is not passing all required checks. Please see this discussion for information on how to get all checks passing. Inconsistent checks can be manually retried. If a test absolutely can not pass for a good reason, please add a comment with an explanation to the PR. |
<meta charset="UTF-8"> | ||
<title>M@S Benchmarks</title> | ||
<script> | ||
const start = performance.now(); |
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.
You can also use mark and measure apis that do not require you to assign values to variables.
performance.mark('commerceStart');
performance.mark('commerceEnd');
performance.measure('commerceLoadTime', 'commerceStart', 'commerceEnd');
</head> | ||
|
||
<script> | ||
const measureCardPerformances = async (container, fragmentId) => { |
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 should probably incorporate performance api to merch-card
and aem-fragment
custom elements directly.
and use performance api entries while reporting the measurements.
i'll incorporate @yesil feedbacks + will try to post results to some place |
This PR has not been updated recently and will be closed in 7 days if no action is taken. Please ensure all checks are passing, https://github.com/orgs/adobecom/discussions/997 provides instructions. If the PR is ready to be merged, please mark it with the "Ready for Stage" label. |
Closing this PR due to inactivity. |
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.
needs a small fix for ccd.html
libs/features/mas/docs/ccd.html
Outdated
@@ -51,7 +51,20 @@ | |||
</script> | |||
</head> | |||
|
|||
<<<<<<< HEAD |
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.
merge issue?
https://mwpw-163603--milo--npeltier.aem.page/libs/features/mas/docs/ccd.html is broken a bit
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.
could you try running npm install in /libs/features/mas?
i wonder if it will remove changes in merch-stock.js etc
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.
LGTM 👍
libs/features/mas/docs/ccd.html
Outdated
<body class="spectrum spectrum--medium spectrum--light"> | ||
<main> | ||
<body class="spectrum spectrum--medium spectrum--light"> | ||
<div class="sidenav"> |
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.
nit: you could use aside
for element
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/aside
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.
sure :)
benchmark page (only CCD for now)
250ms limit in:
/libs/features/mas/docs/benchmarks.html
adjusted to network timing in :
/libs/features/mas/docs/benchmarks.html?adjust=true
There is still a risk that some perf degradation passes tests if they are run on slow networks, but that's all we can do atm.
Test URLs: