Giter Club home page Giter Club logo

Comments (14)

franjohn21 avatar franjohn21 commented on July 21, 2024 4

I wrote up a post on my experience setting up webpagetest for mac os and turning off traffic shaping. Let me know if there's anything you have found for better workarounds.

from webpagetest.agent.

pmeenan avatar pmeenan commented on July 21, 2024 1

FWIW, traffic-shaping is now fully supported on OSX (as of a few minutes ago) as is Firefox with Video capture. It should be feature-compatible with the Windows and Linux agents now.

from webpagetest.agent.

pmeenan avatar pmeenan commented on July 21, 2024

Yeah, shaping hasn't been implemented for OSX yet. It actually hasn't been tested on OSX at all so you may bump into a few issues here and there.

You disable shaping in locations.ini on the server. In the location for the test agent add:

connectivity=LAN

LAN can be anything, it's just a display string but when connectivity= is defined then shaping will be disabled.

from webpagetest.agent.

joacim-boive avatar joacim-boive commented on July 21, 2024

Hm, that didn't make any difference - except that I only can choose Connection: LAN.

Works running thru a Windows virtual machine using the same webpagetest server.
But, I was hoping to avoid that and using Docker for both the server and the agent.

Any ideas would be appreciated. :)

from webpagetest.agent.

pmeenan avatar pmeenan commented on July 21, 2024

try also adding --shaper none to the command-line for the agent.

from webpagetest.agent.

joacim-boive avatar joacim-boive commented on July 21, 2024

I did work around it by setting up a "normal" virtual machine as a client running Windows.
But I'll try @franjohn21 solution - looks great from what I read.

Thanks!

from webpagetest.agent.

franjohn21 avatar franjohn21 commented on July 21, 2024

That's awesome @pmeenan. Thanks

from webpagetest.agent.

gitjpuser avatar gitjpuser commented on July 21, 2024

Websocket Error: Network Error 12002, The operation timed out
Due to this error message in console i am not execute my wpt script.

from webpagetest.agent.

pmeenan avatar pmeenan commented on July 21, 2024

@gitjpuser Can you open a new issue and include the log from the console? That is a different issue from traffic-shaping.

from webpagetest.agent.

joacim-boive avatar joacim-boive commented on July 21, 2024

@pmeenan Is there any information available that you could point me too regarding setting up traffic shaping on OSX I'd appreciate it. ;)

from webpagetest.agent.

pmeenan avatar pmeenan commented on July 21, 2024

If you are using the agent code from after the change was pushed it should just work (no command-line flags).

The one thing that needs to be in place is that the sudo access for the user running the agent needs to not prompt for password. That is done by running "sudo visudo" with an entry like this: https://askubuntu.com/a/574454

If you are interested in how to do it from the command-line for other purposes, the code is here

from webpagetest.agent.

franjohn21 avatar franjohn21 commented on July 21, 2024

If we run it through the linux headless agent via Docker on an OS X host, traffic shaping still does not work in that case though, right? Or are there other configuration steps required?

from webpagetest.agent.

pmeenan avatar pmeenan commented on July 21, 2024

Traffic-shaping docker containers is difficult at best generally but even more difficult when it's not on a Linux host. Good thread here.

It certainly won't work out of the box and would need some dev work if someone can figure out what magical incantations work (if it is even possible from within the container). Full virtualization is heavier but works a lot better.

from webpagetest.agent.

jpvincent avatar jpvincent commented on July 21, 2024

For a docker container inside an OSX, trafic shaping still does not work. I also did not manage to have it work on an Ubuntu from within a windows (but it does work on a normal Ubuntu).
The sitespeed.io team had the same problem and ended up with an utility that throttle the entire machine : https://github.com/sitespeedio/throttle
If that works for you, I ended up with this script :

sudo throttle --up 6000 --down 12000 --rtt 70
docker run --cap-add=NET_ADMIN -p 4001:80 \
    --rm \
    --privileged \
    --network="host" \
    -e "SERVER_URL=http://localhost:3999/work/" \
    -e "LOCATION=Test" \
    -e "SHAPER=none" \
    webpagetest/agent:20.06
sudo throttle stop

it throttles the host, runs the agent with no trafic shaping, then you can make your test from your private instance (docker run -d -p 3999:80 --rm webpagetest/server, open localhost:3999 and remember to select "Native" in the Connection menu of the Advanced options). When your test is done, exit and throttling stops.

from webpagetest.agent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.