WebPagetest Forums

Full Version: WPT Rest API & "discard" Parameter
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I've recently been handed an old application that sends test requests to the WPT API every so often. It's an older application and none of its original authors are around, so I'm learning as I go, and I've hit a bug of sorts. Tests that are submitted for 5 runs are ceasing operation after the first run. I've tracked this down to the undocumented "discard" parameter. If I remove that, the tests run through to completion.

I've tried to go through WPT's source code to figure out precisely what "discard" is meant to do, but I'm having trouble determining anything. My guess is that it tells WPT to ignore there results of the first X runs, but I can't confirm that.

Here's the (nearly) full set of parameters I'm passing. Some omitted for security reasons.

Quote:'noopt': 1,
'runs': 6,
'discard': 1,
'ignoreSSL': 1,
'f': 'xml',
'url': 'http://www.mittners.net/',
'timeline': 1,
'private': 1,
'label': 'not-optimized cc',
'r': 12345,
'fvonly': 1,
'location': 'London_EC2.Native',
'time': 7,
'video': 1

Can anyone tell why the "discard" would be causing WPT to evidently crash after a test's first run?

Bonus points for anyone who can define exactly what "discard" is meant to do...

Thanks
discard is supposed to throw away the first x number of tests but there's a strong possibility that it isn't implemented in the new agents.
Reference URL's