-
-
Notifications
You must be signed in to change notification settings - Fork 616
Open
Description
Have you read the documentation?
- Yes, I've read the how to make a reproducable bug guide
- Yes, I've read the how to debug my script guide
URL
script with multiple urls
What are you trying to accomplish
We have a need to collect perf metrics on the page when cache is disabled or nothing is cached on the client Browser.
I tried to accomplish this with several sitespeed.io provided command line arguments but none appear to work:
- --browsertime.chrome.args="--disable-cache,--disable-application-cache"
- --browsertime.cacheClearRaw true --browsertime.cacheClear true
What browser did you use?
Chrome
How to reproduce
Execute the script on Windows Desktop as follows:
node bin/sitespeed.js -b chrome -n 1 --browsertime.chrome.args="--disable-cache,--disable-application-cache" --browsertime.chrome.args="--incognito" --firstParty .*domain.* --video --visualMetrics --multi search_notCached.mjs
Here is the script:
/**
*
* @param {import('browsertime').BrowsertimeContext} context
* @param {import('browsertime').BrowsertimeCommands} commands
*/
export default async function (context, commands) {
const seleniumWebdriver = context.selenium.webdriver;
const By = seleniumWebdriver.By;
const seleniumDriver = context.selenium.driver;
await seleniumDriver.manage().window().maximize();
await commands.navigate(
'https://domain/';
await seleniumDriver.findElement(By.id('searchval')).sendKeys('green cup');
const search = await seleniumDriver.findElement(By.xpath('//div[contains(@class,"lt:flex")]//button[@value="Search"]'));
await commands.measure.start('Search');
await search.click();
await commands.wait.byPageToComplete();
await commands.measure.stop();
};
Still shows memory and disk cache for JS:
---See image showing cache happening in the previous section above---Log output
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels