WebPagetest Forums
WPT Rest API & "discard" Parameter - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: WebPagetest (/forumdisplay.php?fid=7)
+--- Forum: Bugs/Issues (/forumdisplay.php?fid=10)
+--- Thread: WPT Rest API & "discard" Parameter (/showthread.php?tid=15396)



WPT Rest API & "discard" Parameter - dmittner - 06-05-2018 07:52 AM

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


RE: WPT Rest API & "discard" Parameter - pmeenan - 06-05-2018 11:53 PM

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.