browsertime 24.8.0 → 24.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/browserscripts/pageinfo/visualElements.js +1 -1
- package/browserscripts/timings/navigationTiming.js +0 -37
- package/browserscripts/timings/pageTimings.js +1 -18
- package/browserscripts/timings/serverTimings.js +8 -6
- package/package.json +1 -1
- package/visualmetrics/visualmetrics-portable.py +5 -5
- package/visualmetrics/visualmetrics.py +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Browsertime changelog (we do [semantic versioning](https://semver.org))
|
|
2
2
|
|
|
3
|
+
## 24.8.2 - 2025-06-22
|
|
4
|
+
### Fixed
|
|
5
|
+
* Fix for serverTiming - thank you [Gregory Mierzwinski](https://github.com/gmierz) for PR [#2301](https://github.com/sitespeedio/browsertime/pull/2301)
|
|
6
|
+
|
|
7
|
+
## 24.8.1 - 2025-06-01
|
|
8
|
+
### Fixed
|
|
9
|
+
* [Visual Elements] Fix split for selector to include full value with ':'` - thank you [Pavel Bairov](https://github.com/Amerousful) for PR [#2298](https://github.com/sitespeedio/browsertime/pull/2298).
|
|
10
|
+
|
|
3
11
|
## 24.8.0 - 2025-05-30
|
|
4
12
|
### Added
|
|
5
13
|
* Updated to Chrome/Chromedriver 137 and Firefox 139 in the Docker container [#2284](https://github.com/sitespeedio/browsertime/pull/2284).
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
for (const nameAndSelector of customArray) {
|
|
92
92
|
const parts = nameAndSelector.split(':');
|
|
93
93
|
const type = parts[0];
|
|
94
|
-
const selector =
|
|
94
|
+
const selector = nameAndSelector.slice(nameAndSelector.indexOf(':') + 1);
|
|
95
95
|
const element = document.body.querySelector(selector);
|
|
96
96
|
try {
|
|
97
97
|
if (isElementPartlyInViewportAndVisible(element)) {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
(function() {
|
|
2
2
|
let t = window.performance.getEntriesByType('navigation')[0];
|
|
3
3
|
const d = 0;
|
|
4
|
-
if (t) {
|
|
5
4
|
return {
|
|
6
5
|
connectStart: Number(t.connectStart.toFixed(d)),
|
|
7
6
|
domComplete: Number(t.domComplete.toFixed(d)),
|
|
@@ -27,40 +26,4 @@
|
|
|
27
26
|
unloadEventStart: Number(t.unloadEventStart.toFixed(d)),
|
|
28
27
|
workerStart: Number(t.workerStart.toFixed(d))
|
|
29
28
|
};
|
|
30
|
-
} else {
|
|
31
|
-
// For Safari
|
|
32
|
-
t = window.performance.timing;
|
|
33
|
-
return {
|
|
34
|
-
navigationStart: 0,
|
|
35
|
-
unloadEventStart:
|
|
36
|
-
t.unloadEventStart > 0
|
|
37
|
-
? t.unloadEventStart - t.navigationStart
|
|
38
|
-
: undefined,
|
|
39
|
-
unloadEventEnd:
|
|
40
|
-
t.unloadEventEnd > 0 ? t.unloadEventEnd - t.navigationStart : undefined,
|
|
41
|
-
redirectStart:
|
|
42
|
-
t.redirectStart > 0 ? t.redirectStart - t.navigationStart : undefined,
|
|
43
|
-
redirectEnd:
|
|
44
|
-
t.redirectEnd > 0 ? t.redirectEnd - t.navigationStart : undefined,
|
|
45
|
-
fetchStart: t.fetchStart - t.navigationStart,
|
|
46
|
-
domainLookupStart: t.domainLookupStart - t.navigationStart,
|
|
47
|
-
domainLookupEnd: t.domainLookupEnd - t.navigationStart,
|
|
48
|
-
connectStart: t.connectStart - t.navigationStart,
|
|
49
|
-
connectEnd: t.connectEnd - t.navigationStart,
|
|
50
|
-
secureConnectionStart: t.secureConnectionStart
|
|
51
|
-
? t.secureConnectionStart - t.navigationStart
|
|
52
|
-
: undefined,
|
|
53
|
-
requestStart: t.requestStart - t.navigationStart,
|
|
54
|
-
responseStart: t.responseStart - t.navigationStart,
|
|
55
|
-
responseEnd: t.responseEnd - t.navigationStart,
|
|
56
|
-
domLoading: t.domLoading - t.navigationStart,
|
|
57
|
-
domInteractive: t.domInteractive - t.navigationStart,
|
|
58
|
-
domContentLoadedEventStart:
|
|
59
|
-
t.domContentLoadedEventStart - t.navigationStart,
|
|
60
|
-
domContentLoadedEventEnd: t.domContentLoadedEventEnd - t.navigationStart,
|
|
61
|
-
domComplete: t.domComplete - t.navigationStart,
|
|
62
|
-
loadEventStart: t.loadEventStart - t.navigationStart,
|
|
63
|
-
loadEventEnd: t.loadEventEnd - t.navigationStart
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
29
|
})();
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
(function() {
|
|
2
2
|
let t = window.performance.getEntriesByType('navigation')[0];
|
|
3
3
|
const d = 0;
|
|
4
|
-
if (t) {
|
|
5
4
|
return {
|
|
6
5
|
domainLookupTime: Number(
|
|
7
6
|
(t.domainLookupEnd - t.domainLookupStart).toFixed(d)
|
|
@@ -15,21 +14,5 @@
|
|
|
15
14
|
pageLoadTime: Number(t.loadEventStart.toFixed(d)),
|
|
16
15
|
frontEndTime: Number((t.loadEventStart - t.responseEnd).toFixed(d)),
|
|
17
16
|
backEndTime: Number(t.responseStart.toFixed(d))
|
|
18
|
-
}
|
|
19
|
-
} else {
|
|
20
|
-
// Safari
|
|
21
|
-
t = window.performance.timing;
|
|
22
|
-
return {
|
|
23
|
-
domainLookupTime: t.domainLookupEnd - t.domainLookupStart,
|
|
24
|
-
redirectionTime: t.fetchStart - t.navigationStart,
|
|
25
|
-
serverConnectionTime: t.connectEnd - t.connectStart,
|
|
26
|
-
serverResponseTime: t.responseEnd - t.requestStart,
|
|
27
|
-
pageDownloadTime: t.responseEnd - t.responseStart,
|
|
28
|
-
domInteractiveTime: t.domInteractive - t.navigationStart,
|
|
29
|
-
domContentLoadedTime: t.domContentLoadedEventStart - t.navigationStart,
|
|
30
|
-
pageLoadTime: t.loadEventStart - t.navigationStart,
|
|
31
|
-
frontEndTime: t.loadEventStart - t.responseEnd,
|
|
32
|
-
backEndTime: t.responseStart - t.navigationStart
|
|
33
|
-
};
|
|
34
|
-
}
|
|
17
|
+
}
|
|
35
18
|
})();
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
(function () {
|
|
2
2
|
let t = window.performance.getEntriesByType('navigation')[0];
|
|
3
3
|
const serverTimings = [];
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
if (t.serverTiming) {
|
|
5
|
+
for (let timing of t.serverTiming) {
|
|
6
|
+
serverTimings.push({
|
|
7
|
+
name: timing.name,
|
|
8
|
+
duration: timing.duration,
|
|
9
|
+
description: timing.description
|
|
10
|
+
});
|
|
11
|
+
}
|
|
10
12
|
}
|
|
11
13
|
return serverTimings;
|
|
12
14
|
})();
|
package/package.json
CHANGED
|
@@ -193,12 +193,12 @@ def blank_frame(file, color="white"):
|
|
|
193
193
|
def edges_im(img):
|
|
194
194
|
"""Find the edges of the given image.
|
|
195
195
|
|
|
196
|
-
First, we apply a gaussian filter using a
|
|
196
|
+
First, we apply a gaussian filter using a kernel of radius=13,
|
|
197
197
|
and sigma=1 to a grayscale version of the image. Then we apply
|
|
198
198
|
CED to find the edges.
|
|
199
199
|
|
|
200
200
|
We calculate the hysterisis thresholds for the CED using the min and max
|
|
201
|
-
|
|
201
|
+
values of the blurred image. We use 10% as the lower threshold,
|
|
202
202
|
and 30% as the upper threshold.
|
|
203
203
|
"""
|
|
204
204
|
try:
|
|
@@ -1310,7 +1310,7 @@ def calculate_visual_metrics(
|
|
|
1310
1310
|
json.dump(hero_data, hero_f_out)
|
|
1311
1311
|
hero_f_out.close()
|
|
1312
1312
|
else:
|
|
1313
|
-
logging.
|
|
1313
|
+
logging.warning(
|
|
1314
1314
|
"Hero elements file is not valid: " + str(hero_elements_file)
|
|
1315
1315
|
)
|
|
1316
1316
|
else:
|
|
@@ -1460,7 +1460,7 @@ def calculate_frame_progress(histogram, start, final):
|
|
|
1460
1460
|
This method finds the visually-complete progress by taking a sum of
|
|
1461
1461
|
all the differences in the histogram between the current frame, and the
|
|
1462
1462
|
final frame. The initial/first frame is used to remove values that are
|
|
1463
|
-
|
|
1463
|
+
consistent between the first, and final frame (i.e. it's a baseline).
|
|
1464
1464
|
|
|
1465
1465
|
Note that this method should not be using a slop/fuzz because we aren't
|
|
1466
1466
|
looking at individual pixel intensities which is where the fuzz can be
|
|
@@ -1885,7 +1885,7 @@ def main():
|
|
|
1885
1885
|
"--viewportretries",
|
|
1886
1886
|
type=int,
|
|
1887
1887
|
default=5,
|
|
1888
|
-
help="Number of times to attempt to obtain a viewport.
|
|
1888
|
+
help="Number of times to attempt to obtain a viewport. Analogous to the "
|
|
1889
1889
|
"number of frames to try to find a viewport with. By default, up to the "
|
|
1890
1890
|
"first 5 frames are used.",
|
|
1891
1891
|
)
|
|
@@ -1715,7 +1715,7 @@ def calculate_visual_metrics(
|
|
|
1715
1715
|
json.dump(hero_data, hero_f_out)
|
|
1716
1716
|
hero_f_out.close()
|
|
1717
1717
|
else:
|
|
1718
|
-
logging.
|
|
1718
|
+
logging.warning(
|
|
1719
1719
|
"Hero elements file is not valid: " + str(hero_elements_file)
|
|
1720
1720
|
)
|
|
1721
1721
|
else:
|
|
@@ -2320,7 +2320,7 @@ def main():
|
|
|
2320
2320
|
default=False,
|
|
2321
2321
|
help="Multiple videos are combined, separated by orange frames."
|
|
2322
2322
|
"In this mode only the extraction is done and analysis "
|
|
2323
|
-
"needs to be run
|
|
2323
|
+
"needs to be run separately on each directory. Numbered "
|
|
2324
2324
|
"directories will be created for each video under the output "
|
|
2325
2325
|
"directory.",
|
|
2326
2326
|
)
|
|
@@ -2348,7 +2348,7 @@ def main():
|
|
|
2348
2348
|
"--viewportretries",
|
|
2349
2349
|
type=int,
|
|
2350
2350
|
default=5,
|
|
2351
|
-
help="Number of times to attempt to obtain a viewport.
|
|
2351
|
+
help="Number of times to attempt to obtain a viewport. Analogous to the "
|
|
2352
2352
|
"number of frames to try to find a viewport with. By default, up to the "
|
|
2353
2353
|
"first 5 frames are used.",
|
|
2354
2354
|
)
|