sitespeedio / dashboard.sitespeed.io

Example how to use sitespeed.io to monitor the performance of your web site

Home Page:https://www.sitespeed.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Resolving host while using txt-file

dbrau opened this issue · comments

commented

Dear sitespeed-team,
dear @soulgalore ,

we use the sitespeed dashboard to measure the response times of a website.
With the dashboard it is possible to check the website via the txt file and the Json file.

The code in the "run.sh" file looks like that

for url in tests/$TEST/desktop/urls/.txt ; do
[ -e "$url" ] || continue
for browser in "${BROWSERS[@]}" ; do
POTENTIAL_CONFIG="./config/$(basename ${url%%.
}).json"
[[ -f "$POTENTIAL_CONFIG" ]] && CONFIG_FILE="$(basename ${url%.}).json" || CONFIG_FILE="desktopWithExtras.json"
NAMESPACE="--graphite.namespace sitespeed_io.$(basename ${url%%.
})"
docker run $DOCKER_SETUP $DOCKER_CONTAINER $NAMESPACE CONFIG/$CONFIG_FILE -b $browser $url
control
done
done

The file contains a URL on each line.

However, if we test the website in this way, we get a response time that does not match the perceived website call at all.
In order to find out why time is so different, we have activated the recording of a video in the dashboard as follows:

file "config/desktop.json"
{
"extends": "/config/secrets.json",
"browsertime": {
"connectivity": {
"engine": "external",
"profile": "native"
},
"visualMetric": true,
"visualElements": true,
"iterations": 1,
"browser": "chrome",
"video": true,
"chrome": {
"timeline": true,
"collectConsoleLog": false,
"enableTraceScreenshots": false
},
"firefox": {
"includeResponseBodies": "all",
"disableBrowsertimeExtension": true,
"windowRecorder": false,
"geckoProfiler": true
},
"pageLoadStrategy": "none",
"pageCompleteWaitTime": 0,
"pageCompleteCheckStartWait": 0,
"pageCompleteCheckPollTimeout": 0
},
"cpu": false,
"gzipHAR": false,
"html": {
"fetchHARFiles": true,
"showScript": false,
"compareURL": "https://compare.sitespeed.io/"
},
"plugins": {
"remove": ["axe","sustainable"]
},
"screenshot": {
"type": "jpg"
}
}

The videos are also created. However, if we look at the videos from this URL, we see that "resolving host" is displayed at the bottom left for a very long time when the website is opened. This also explains why the call takes so long.

Since we cannot explain this, we also called the URL via the Json file.
The content of the Json file looks like this:

module.exports = async function(context, commands) {
await commands.measure.start('https://URL-here/', 'Landingpage');
return await commands.screenshot.take('screen_website');
};

However, these videos from this call are only with white content.

Why does it take so long to access the website with the txt file (resolving host problem)?

We would be really happy if you could help us. We would like to continue using sitespeed, but we cannot explain the times.

Thanks your
Danny

commented

I forgot: We are now using version DOCKER_CONTAINER=sitespeedio/sitespeed.io:12.5.1

Hi @dbrau I don't think there's a difference how you run if you feed the URLs via a text file or via scripting (the JSON file).

Easiest to see where the time I spent is looking in the waterfall/HAR file and check there. If it looks like that the container takes time resolving your host, checkout to change DNS server for Docker or maybe try --network=host for your container.

commented

Peter, you are a genius =)
Thanks for your mind support. The problem appears to have been resolved and was an internal problem.
I changed the addresses and searches in the netplan configuration of the server and now there is no "resolving host" problem anymore. Now it is as we thought / wished it. =)

Thanks you very much. I will also close my other issue.
Stay healthy!

Danny