nodejs-Agent and traffic-shaping

Hey guys,

I’m working at Iteratec GmbH and enabling the multistep-feature for your nodejs-Agent which works quite good!
Now I’m trying to get the traffic-shaping feature working but the documentation doesn’t match the code.

At the docu it says, there should be a switch “–trafficShaper” and “–trafficShaperArg”. By that switches you should be allowed to give the client a customized traffic-shaping script.
But in the code (wptdriver.bat and .sh) I can’t find those switches. Aren’t they implemented yet or did I miss them?

Second thing: if you use the builtin ipfw traffic-shaping, are there network performance problems, if 3 nodejs-agents are using traffic-shaping over the same notebook-connection?

Best regards,
Birger

  1. I believe the traffic shaper is executed through the daemon that’s running (the agent), so when it grabs a job from the WPT server, it sees the traffic shaping bit and executes it.
    https://github.com/WPO-Foundation/webpagetest/blob/master/agent/js/src/agent_main.js#L616

  2. Depends on how much load you’re putting on the connection at any time.

Thanks for your fast answer!

You’re right, that’s the built-in traffic-shaping which uses by default ipfw of the “host”-notebook.

But the documentation talks about the possibility to use a selfmade traffic-shaping script by using the “–trafficShaper” switch. By setting this switch the application (especially your linked function) should use this selfmade script instead of ipfw.
But I can’t find that switch in the existing start-scripts.

[quote=“BirgerK, post:3, topic:9225”]But the documentation talks about the possibility to use a selfmade traffic-shaping script by using the “–trafficShaper” switch. But I can’t find that switch in the existing start-scripts.
[/quote]

Ah, yes … it’s a custom implementation and hasn’t been integrated to the “core”
See Move agent's traffic shaping to shell script · Issue #147 · WPO-Foundation/webpagetest · GitHub

You might be able to find some modification in the text/links there to the scripts that will help you.