-
Notifications
You must be signed in to change notification settings - Fork 745
Closed
Labels
Type: BugAn issue or pull request relating to a bug in WebPageTestAn issue or pull request relating to a bug in WebPageTeststale
Description
Description
The code merging blocking times (
Lines 700 to 724 in 5dcc6b7
| // Merge a start/end window into an existing array of times | |
| function MergeBlockingTime(&$times, $start, $end) | |
| { | |
| $merged = false; | |
| // See if it overlaps with an existing window | |
| for ($i = 0; $i < count($times) && !$merged; $i++) { | |
| $s = $times[0]; | |
| $e = $times[1]; | |
| if ( | |
| ($start >= $s && $start <= $e) || | |
| ($end >= $s && $end <= $e) || | |
| ($s >= $start && $s <= $end) || | |
| ($e >= $start && $e <= $end) | |
| ) { | |
| $times[0] = min($start, $s); | |
| $times[1] = max($end, $e); | |
| $merged = true; | |
| } | |
| } | |
| if (!$merged) { | |
| $times[] = array($start, $end); | |
| } | |
| } |
[$i] in the lines 707, 708, 715, 716.
Steps to reproduce
The current code end up comparing number ($start and $end) with arrays ($s and $e), which does not seems to make any sense. Some values are never used (only using the first 2 arrays of $times).
In this section https://www.webpagetest.org/vitals.php?test=231103_AiDcHB_86B&run=1#tbt I get 9ms difference with cdn.digiteka.com
Expected result
I guess what is expected is $times[$i][0] and $times[$i][1]
Actual result
With overlapping tasks, some domains can get 9ms more blocking time.
Related issues?
Any related issues filed already? Haven't found any
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type: BugAn issue or pull request relating to a bug in WebPageTestAn issue or pull request relating to a bug in WebPageTeststale