Thank you for making hosted webpagetest free and open for all!
Found two bugs in the id generation routines, which may prevent submitted tests from running in sequential order of their submission time:
Private tests Ids contain no sequential part, and will run by submission order:
if( $test['private'] ) $id = md5(uniqid(rand(), true)); else $id = uniqueId();
Since the entire id is hashed, it is not part of the order of other tests. I suggest changing it to be part hash, and part of the sequentially generated id, something like:
$id = uniqueId() . “_” .md5(uniqid(rand(), true));
(Have to mention the the use of PHP’s uniqid() function, and WebPageTest’s uniqueId() confused me a bit).
- The ID generated by uniqueId() in unique.inc is not alphabetically ordered, when the number of encoded characters generated by it changes. For example, you might generate jobs with those ids and filenames:
in getwork.php, the use of scandir() function, will return 110213_001.p2 and 110213_002.p2 first, and only then will get back to ZY and ZZ.
This could be easily resolved by adding a padding to the encoded ID, so it will be of fixed length, i.e 00000000000ZZ, and then alphabetical ordering would work fine.
Acceloweb - http://www.acceloweb.com