-
-
Notifications
You must be signed in to change notification settings - Fork 137
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
StopWatch and custom metrics associated with wrong URL-or-alias #1983
Comments
Note that the log shows a hint:
This error seems to be in reference to The I think this is due to https://github.com/sitespeedio/browsertime/blob/main/lib/core/engine/command/measure.js#L327 . When adding a metric, the index used is The doc language on StopWatch.stopAndAdd() says that the measurement will be added to the "last measured page", which suggests that this could conceivably be intentional behaviour -- but if it is, then it makes stopwatches awkward to use. |
The stop watch is always registered to the last measured URL, so to make it work you need to adjust the script to first measure that first page load and then do the stop watch thing. |
Are you saying that the correct version of the script is not:
but instead:
because that makes |
Have you read the documentation?
URL
https://sitespeed.io
What are you trying to accomplish
I'm testing an SPA and trying to record several test cases, each of which has custom timers using a stopwatch. I am trying to automate extracting those custom timers from JSON data retrieved using the
analysisstorer
plugin.What browser did you use?
Chrome
How to reproduce
Log output
The text was updated successfully, but these errors were encountered: