browsertime 24.8.1 → 24.9.0
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 +61 -46
- package/browserscripts/timings/navigationTiming.js +0 -37
- package/browserscripts/timings/pageTimings.js +1 -18
- package/browserscripts/timings/serverTimings.js +8 -6
- package/lib/support/har/index.js +18 -12
- package/package.json +4 -4
- package/visualmetrics/visualmetrics-portable.py +5 -5
- package/visualmetrics/visualmetrics.py +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Browsertime changelog (we do [semantic versioning](https://semver.org))
|
|
2
2
|
|
|
3
|
+
## 24.9.0 - 2025-06-30
|
|
4
|
+
### Added
|
|
5
|
+
* Update Docker container to use Chrome/edge 138, Firefox 140. Add Edgedriver and Chromedrinver 138 [#2303](https://github.com/sitespeedio/browsertime/pull/2303).
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
* Update Selenium webdriver to 4.34.0 [#2304](https://github.com/sitespeedio/browsertime/pull/2304).
|
|
9
|
+
* Add extra try/catch if main document timings is missing when generating the HAR [#2302](https://github.com/sitespeedio/browsertime/pull/2302).
|
|
10
|
+
|
|
11
|
+
## 24.8.2 - 2025-06-22
|
|
12
|
+
### Fixed
|
|
13
|
+
* Fix for serverTiming - thank you [Gregory Mierzwinski](https://github.com/gmierz) for PR [#2301](https://github.com/sitespeedio/browsertime/pull/2301).
|
|
14
|
+
* Cleanup how we get the navigation timing metrics [#2300](https://github.com/sitespeedio/browsertime/pull/2300).
|
|
15
|
+
* Fix depercation warnings in visual metrics. Thank you [Emmanuel Ferdman](https://github.com/emmanuel-ferdman) for PR [#2297](https://github.com/sitespeedio/browsertime/pull/2297).
|
|
16
|
+
|
|
17
|
+
|
|
3
18
|
## 24.8.1 - 2025-06-01
|
|
4
19
|
### Fixed
|
|
5
20
|
* [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).
|
|
@@ -181,7 +196,7 @@ Andy Davies](https://github.com/andydavies) cool [https://github.com/andydavies/
|
|
|
181
196
|
### Added
|
|
182
197
|
* Updated to Chrome and Chromedriver 130 [#2192](https://github.com/sitespeedio/browsertime/pull/2192)
|
|
183
198
|
* The Chrome in the ARM container is bumped from 107 to 130 [#2194](https://github.com/sitespeedio/browsertime/pull/2194).
|
|
184
|
-
|
|
199
|
+
|
|
185
200
|
### Fixed
|
|
186
201
|
* New Geckodriver install that fixes running on ARM in the Docker container [#2193](https://github.com/sitespeedio/browsertime/pull/2193).
|
|
187
202
|
|
|
@@ -381,7 +396,7 @@ There's a breaking change for Firefox if you add your own request header or if y
|
|
|
381
396
|
|
|
382
397
|
## 21.5.0 - 2024-03-12
|
|
383
398
|
### Added
|
|
384
|
-
* Firefox:
|
|
399
|
+
* Firefox:
|
|
385
400
|
* Move injectJS functionality to Bidi [#2088](https://github.com/sitespeedio/browsertime/pull/2088). This makes it possible to inject JS in Firefox on mobile.
|
|
386
401
|
* Expose Bidi in commands [#2091](https://github.com/sitespeedio/browsertime/pull/2091). You can now use webdriver bidi direct in your commands.
|
|
387
402
|
### Fixed
|
|
@@ -419,7 +434,7 @@ There's a breaking change for Firefox if you add your own request header or if y
|
|
|
419
434
|
* Set correct viewports for the following emulated mobiles for Chrome: iPhone 14 Pro Max [#2070](https://github.com/sitespeedio/browsertime/pull/2070).
|
|
420
435
|
* Update adbkit to 3.2.6 [#2069](https://github.com/sitespeedio/browsertime/pull/2069).
|
|
421
436
|
* Selenium 4.17.0 [#2068](https://github.com/sitespeedio/browsertime/pull/2068).
|
|
422
|
-
* There was a missing await when getting the tcpdump [#2075](https://github.com/sitespeedio/browsertime/pull/2075)
|
|
437
|
+
* There was a missing await when getting the tcpdump [#2075](https://github.com/sitespeedio/browsertime/pull/2075)
|
|
423
438
|
* Remove all trace level logs (and do debug instead) since trace added unnecessary stacktraces to the log [#2074](https://github.com/sitespeedio/browsertime/pull/2074).
|
|
424
439
|
|
|
425
440
|
## 21.1.0 - 2024-01-24
|
|
@@ -466,7 +481,7 @@ The new version uses JSDoc to generate documentation for scripting and make it p
|
|
|
466
481
|
* Firefox 121 in the Docker container.g
|
|
467
482
|
|
|
468
483
|
## 19.3.1 - 2023-12-18
|
|
469
|
-
### Fixed
|
|
484
|
+
### Fixed
|
|
470
485
|
* Ensure that visual metrics python script is included in the release.
|
|
471
486
|
|
|
472
487
|
## 19.3.0 - 2023-12-18
|
|
@@ -513,7 +528,7 @@ The new version uses JSDoc to generate documentation for scripting and make it p
|
|
|
513
528
|
* Updated all dependencies to latest versions: ADB kit 3.2.5 [#2017](https://github.com/sitespeedio/browsertime/pull/2017), execa, dayjs, get-port and Chromedriver [#2015](https://github.com/sitespeedio/browsertime/pull/2015).
|
|
514
529
|
|
|
515
530
|
## 17.19.0 - 2023-11-03
|
|
516
|
-
### Added
|
|
531
|
+
### Added
|
|
517
532
|
* Updated to Chrome, Firefox and Edge 119 in the Docker container [#2010](https://github.com/sitespeedio/browsertime/pull/2010).
|
|
518
533
|
* Updated to Edgedriver 119.
|
|
519
534
|
|
|
@@ -529,7 +544,7 @@ The new version uses JSDoc to generate documentation for scripting and make it p
|
|
|
529
544
|
### Added
|
|
530
545
|
* Updated to Chromedriver 119 [#2003](https://github.com/sitespeedio/browsertime/pull/2003). 119 works with both Chrome 118 and 119 so it fixes [#1197](https://github.com/sitespeedio/browsertime/issues/1997).
|
|
531
546
|
* Add support for network idle method to know when to end a test that uses network logs. Uses Bidi for Firefox and CDP for Chrome to listen on network events to know when to end a test. By default 5 seconds idle network time ends a tests (you could have network responses that hasn't arrived yet) [#1960](https://github.com/sitespeedio/browsertime/pull/1960). Potentially this can help SPA users or users where the page uses iframes. You can try it out by adding `--pageCompleteCheckNetworkIdle` yo your command line. This is still some work in progress but feel free to try ut out.
|
|
532
|
-
* The resources script now collects number of resources served from the browser cashe for browser that supports that through the resource timing API [#1998](https://github.com/sitespeedio/browsertime/pull/1998)
|
|
547
|
+
* The resources script now collects number of resources served from the browser cashe for browser that supports that through the resource timing API [#1998](https://github.com/sitespeedio/browsertime/pull/1998)
|
|
533
548
|
|
|
534
549
|
### Fixed
|
|
535
550
|
* Make sure timer always is cleared. There was case of where we do a rase beteween a promise and a timeout where the timeout timer wasn't cleared/removed [#2005](https://github.com/sitespeedio/browsertime/pull/2005).
|
|
@@ -547,7 +562,7 @@ The new version uses JSDoc to generate documentation for scripting and make it p
|
|
|
547
562
|
### Added
|
|
548
563
|
* Firefox 117 and Edge 116 in the Docker container.
|
|
549
564
|
|
|
550
|
-
### Fixed
|
|
565
|
+
### Fixed
|
|
551
566
|
* Updated the BiDi HAR exporter for Firefox to version 0.0.12. This version will not work with Firefox 116 so if you use the BiDi HAR exporter you need to upgrade to Firefox 117.
|
|
552
567
|
|
|
553
568
|
## 17.15.0 - 2023-08-16
|
|
@@ -646,10 +661,10 @@ The new version uses JSDoc to generate documentation for scripting and make it p
|
|
|
646
661
|
|
|
647
662
|
## 17.8.1 - 2023-04-12
|
|
648
663
|
### Fixed
|
|
649
|
-
* Upgraded to Firefox HAR 0.0.10 [#1939](https://github.com/sitespeedio/browsertime/pull/1939).
|
|
664
|
+
* Upgraded to Firefox HAR 0.0.10 [#1939](https://github.com/sitespeedio/browsertime/pull/1939).
|
|
650
665
|
## 17.8.0 - 2023-04-11
|
|
651
666
|
### Fixed
|
|
652
|
-
* Upgraded to Firefox HAR 0.0.8 [#1937](https://github.com/sitespeedio/browsertime/pull/1937).
|
|
667
|
+
* Upgraded to Firefox HAR 0.0.8 [#1937](https://github.com/sitespeedio/browsertime/pull/1937).
|
|
653
668
|
|
|
654
669
|
### Added
|
|
655
670
|
* Upgraded to Firefox 112 in the Docker container.
|
|
@@ -694,7 +709,7 @@ The new version uses JSDoc to generate documentation for scripting and make it p
|
|
|
694
709
|
* Bumped Geckodriver to 0.32.2 and Edgedriver to 111.
|
|
695
710
|
|
|
696
711
|
## 17.2.0 - 2023-03-14
|
|
697
|
-
### Added
|
|
712
|
+
### Added
|
|
698
713
|
* Updated Chrome, Chromedriver, Edge and Firefox to 111.
|
|
699
714
|
|
|
700
715
|
## 17.1.1 - 2023-03-04
|
|
@@ -717,7 +732,7 @@ The project was transitioned to a [pure ESM package](https://gist.github.com/sin
|
|
|
717
732
|
|
|
718
733
|
|
|
719
734
|
#### CLI users
|
|
720
|
-
If you are a command line user and use scripting, you will need to do a change to your scripts or add a extra configuration.
|
|
735
|
+
If you are a command line user and use scripting, you will need to do a change to your scripts or add a extra configuration.
|
|
721
736
|
|
|
722
737
|
The new browsertime version treat all JavaScript files that ends with *.js* as ESM modules, that means your old script files will not work out of the box. There's a couple of fixes for that:
|
|
723
738
|
|
|
@@ -737,7 +752,7 @@ export default async function (context, commands) {
|
|
|
737
752
|
}
|
|
738
753
|
```
|
|
739
754
|
|
|
740
|
-
If you have more complicated scripts, follow the [ESM package guide](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c).
|
|
755
|
+
If you have more complicated scripts, follow the [ESM package guide](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c).
|
|
741
756
|
|
|
742
757
|
This is the best fix and will woirk 100% of the time.
|
|
743
758
|
|
|
@@ -745,7 +760,7 @@ This is the best fix and will woirk 100% of the time.
|
|
|
745
760
|
|
|
746
761
|
**Another quick fix alternative**: As a last alternative add `--cjs` as a parameter to your test. That way the scripting file will be treated as a commonjs file. This is a hack, so to make sure it works, the user that runs Browsertime need to have write privileges to the folder where you have your scripting files. Browsertime will create a package.json file on the same levels as yoru script file. If you already have a package.json there, it will be overwritten.
|
|
747
762
|
|
|
748
|
-
#### Non cli users
|
|
763
|
+
#### Non cli users
|
|
749
764
|
If you import Browsertime in NodeJS we changed how you do your import.
|
|
750
765
|
|
|
751
766
|
If you use ES modules you can import Browsertime like this:
|
|
@@ -770,7 +785,7 @@ If you run Browsertime direct using NodeJs (and not using Docker) you need to in
|
|
|
770
785
|
python -m pip install --user OpenCV-Python Numpy
|
|
771
786
|
```
|
|
772
787
|
|
|
773
|
-
This is pretty cool because it makes dependencies easier to install on all platforms + the script has also been cleaned up so its easier for us to maintain.
|
|
788
|
+
This is pretty cool because it makes dependencies easier to install on all platforms + the script has also been cleaned up so its easier for us to maintain.
|
|
774
789
|
|
|
775
790
|
### Added
|
|
776
791
|
* Selenium 4.8.
|
|
@@ -869,7 +884,7 @@ This is pretty cool because it makes dependencies easier to install on all platf
|
|
|
869
884
|
* Fixed `--preWarmServer` so it works with `--headless`, Docker and specific Android or iOS device [#1815](https://github.com/sitespeedio/browsertime/pull/1815).
|
|
870
885
|
## 16.11.0 - 2022-06-28
|
|
871
886
|
|
|
872
|
-
### Added
|
|
887
|
+
### Added
|
|
873
888
|
* Firefox 102 and Edge 103 in the Docker container.
|
|
874
889
|
* Use Edgedriver 103 [#1812](https://github.com/sitespeedio/browsertime/pull/1812)
|
|
875
890
|
### Fixed
|
|
@@ -895,7 +910,7 @@ This is pretty cool because it makes dependencies easier to install on all platf
|
|
|
895
910
|
* Collect number of CPU longtasks before largest contentful paint [#1806](https://github.com/sitespeedio/browsertime/pull/1806).
|
|
896
911
|
|
|
897
912
|
### Fixed
|
|
898
|
-
* Instead of throwing errors and exit the tests if the page hasn't finished loading after 5 minutes, we now gracefully ends the test after 2 minutes (you can change that time with `--maxLoadTime`). That makes more sense than just throwing errors [#1810](https://github.com/sitespeedio/browsertime/pull/1810).
|
|
913
|
+
* Instead of throwing errors and exit the tests if the page hasn't finished loading after 5 minutes, we now gracefully ends the test after 2 minutes (you can change that time with `--maxLoadTime`). That makes more sense than just throwing errors [#1810](https://github.com/sitespeedio/browsertime/pull/1810).
|
|
899
914
|
## 16.8.1 - 2022-06-09
|
|
900
915
|
### Fixed
|
|
901
916
|
* Fix for getting the MOZ log, thank you [Gregory Mierzwinski](https://github.com/gmierz) for PR [#1802](https://github.com/sitespeedio/browsertime/pull/1802).
|
|
@@ -931,7 +946,7 @@ This is pretty cool because it makes dependencies easier to install on all platf
|
|
|
931
946
|
* Only get LCP in Visual Metrics if the LCP API gives us a element [#1786](https://github.com/sitespeedio/browsertime/pull/1786).
|
|
932
947
|
## 16.3.0 - 2022-05-07
|
|
933
948
|
### Added
|
|
934
|
-
* If you use `--visualElements` and the browser supports the Largest Contentful API, we also record
|
|
949
|
+
* If you use `--visualElements` and the browser supports the Largest Contentful API, we also record
|
|
935
950
|
the LCP from the video. This will help the Chrome team and other browser teams to get it right (see [https://bugs.chromium.org/p/chromium/issues/detail?id=1291502](https://bugs.chromium.org/p/chromium/issues/detail?id=1291502)) [#1782](https://github.com/sitespeedio/browsertime/pull/1782).
|
|
936
951
|
|
|
937
952
|
## 16.2.2 - 2022-05-06
|
|
@@ -968,7 +983,7 @@ the LCP from the video. This will help the Chrome team and other browser teams t
|
|
|
968
983
|
### Changed
|
|
969
984
|
* When I introduced flushing of the DNS per run I missed that it makes you need to run sudo to do it (Mac/Linux). That sucks so instead of being able to disable the flushing `--disableDNSFlush` you now enables it with `--flushDNS` [#1752](https://github.com/sitespeedio/browsertime/pull/1752).
|
|
970
985
|
|
|
971
|
-
### Added
|
|
986
|
+
### Added
|
|
972
987
|
* Firefox 99 in the Docker container
|
|
973
988
|
* Edge and Edgedriver 100
|
|
974
989
|
|
|
@@ -994,7 +1009,7 @@ the LCP from the video. This will help the Chrome team and other browser teams t
|
|
|
994
1009
|
* Added more view ports for emulated mobile in Chrome [#1736](https://github.com/sitespeedio/browsertime/pull/1736).
|
|
995
1010
|
## 15.1.1 - 2022-02-24
|
|
996
1011
|
### Fixed
|
|
997
|
-
* Updated Chromedriver dependency that fixes installation on M1 and [some send keys issues](https://chromedriver.storage.googleapis.com/98.0.4758.102/notes.txt).
|
|
1012
|
+
* Updated Chromedriver dependency that fixes installation on M1 and [some send keys issues](https://chromedriver.storage.googleapis.com/98.0.4758.102/notes.txt).
|
|
998
1013
|
## 15.1.0 - 2022-02-24
|
|
999
1014
|
### Added
|
|
1000
1015
|
* Collect timings from main document. The result includes a field named mainDocumentTimings and contains blocked, dns, connect, send, wait, receive, ssl as long as you get a HAR file from the browser [#1735](https://github.com/sitespeedio/browsertime/pull/1735).
|
|
@@ -1043,7 +1058,7 @@ the LCP from the video. This will help the Chrome team and other browser teams t
|
|
|
1043
1058
|
|
|
1044
1059
|
## 14.19.0 - 2022-02-02
|
|
1045
1060
|
|
|
1046
|
-
### Added
|
|
1061
|
+
### Added
|
|
1047
1062
|
* Chrome and Chromedriver 98 [#1704](https://github.com/sitespeedio/browsertime/pull/1704).
|
|
1048
1063
|
|
|
1049
1064
|
### Fixed
|
|
@@ -1075,10 +1090,10 @@ the LCP from the video. This will help the Chrome team and other browser teams t
|
|
|
1075
1090
|
* New click by name command `click.byName(name)` [#1697](https://github.com/sitespeedio/browsertime/pull/1697).
|
|
1076
1091
|
|
|
1077
1092
|
### Fixed
|
|
1078
|
-
* Remove the top 10 rows of the image to handle progress bars on some mobile browser recordings. Thank you [Gregory Mierzwinski](https://github.com/gmierz) for PR [#1687](https://github.com/sitespeedio/browsertime/pull/1687).
|
|
1093
|
+
* Remove the top 10 rows of the image to handle progress bars on some mobile browser recordings. Thank you [Gregory Mierzwinski](https://github.com/gmierz) for PR [#1687](https://github.com/sitespeedio/browsertime/pull/1687).
|
|
1079
1094
|
|
|
1080
1095
|
## 14.16.0 - 2022-01-14
|
|
1081
|
-
### Added
|
|
1096
|
+
### Added
|
|
1082
1097
|
* Upgraded Geckodriver downloader that downloads a pre-built Geckodriver on Raspberry Pis.
|
|
1083
1098
|
|
|
1084
1099
|
## 14.15.0 - 2022-01-12
|
|
@@ -1121,7 +1136,7 @@ the LCP from the video. This will help the Chrome team and other browser teams t
|
|
|
1121
1136
|
### Fixed
|
|
1122
1137
|
* Use the viewport to determine if more cropping is needed in visual metrics. Thank you [Gregory Mierzwinski](https://github.com/gmierz) for PR [#1680](https://github.com/sitespeedio/browsertime/pull/1680).
|
|
1123
1138
|
### Added
|
|
1124
|
-
* Updated to Selenium 4.1.0 [#1679](https://github.com/sitespeedio/browsertime/pull/1679)
|
|
1139
|
+
* Updated to Selenium 4.1.0 [#1679](https://github.com/sitespeedio/browsertime/pull/1679)
|
|
1125
1140
|
|
|
1126
1141
|
## 14.10.2 - 2021-11-20
|
|
1127
1142
|
### Fixed
|
|
@@ -1130,7 +1145,7 @@ the LCP from the video. This will help the Chrome team and other browser teams t
|
|
|
1130
1145
|
## 14.10.1 - 2021-11-19
|
|
1131
1146
|
### Fixed
|
|
1132
1147
|
* Disabled the automatic Chrome/Chromedriver version check in Chromedriver [#1676](https://github.com/sitespeedio/browsertime/pull/1676).
|
|
1133
|
-
* Loop until we find a frame with a good viewport or until we run out of retries for Visual Metrics. Thank you [Gregory Mierzwinski](https://github.com/gmierz) for PR [#1668](https://github.com/sitespeedio/browsertime/pull/1668).
|
|
1148
|
+
* Loop until we find a frame with a good viewport or until we run out of retries for Visual Metrics. Thank you [Gregory Mierzwinski](https://github.com/gmierz) for PR [#1668](https://github.com/sitespeedio/browsertime/pull/1668).
|
|
1134
1149
|
|
|
1135
1150
|
## 14.10.0 - 2021-11-16
|
|
1136
1151
|
### Added
|
|
@@ -1174,7 +1189,7 @@ the LCP from the video. This will help the Chrome team and other browser teams t
|
|
|
1174
1189
|
* Log Firefox preference and Chrome args on debug level [#1654](https://github.com/sitespeedio/browsertime/pull/1654)
|
|
1175
1190
|
## 14.5.0 - 2021-09-30
|
|
1176
1191
|
### Added
|
|
1177
|
-
* Added CSS selector support for mouse commands [#1645](https://github.com/sitespeedio/browsertime/pull/1645)
|
|
1192
|
+
* Added CSS selector support for mouse commands [#1645](https://github.com/sitespeedio/browsertime/pull/1645)
|
|
1178
1193
|
|
|
1179
1194
|
### Fixed
|
|
1180
1195
|
* Internal refactoring of the mouse command [#1646](https://github.com/sitespeedio/browsertime/pull/1646) and [#1647](https://github.com/sitespeedio/browsertime/pull/1647).
|
|
@@ -1282,7 +1297,7 @@ romedriver 94 and Chrome 94 in the Docker container [#1643](https://github.com/s
|
|
|
1282
1297
|
## 12.9.1 - 2021-06-09
|
|
1283
1298
|
### Fixed
|
|
1284
1299
|
* Finally a fix for driving Safari on iOS. Start/stop the Safaridriver manually, see [#1596](https://github.com/sitespeedio/browsertime/pull/1596). Video on iOS is broken though, see if we can find a fix for that too.
|
|
1285
|
-
* Upgrade to use Selenium-4.0.0-beta.4 [#1592](https://github.com/sitespeedio/browsertime/pull/1592) and updated throttle, dayjs, execa and chrome-remote-interface to run latest versions [#1594](https://github.com/sitespeedio/browsertime/pull/1594).
|
|
1300
|
+
* Upgrade to use Selenium-4.0.0-beta.4 [#1592](https://github.com/sitespeedio/browsertime/pull/1592) and updated throttle, dayjs, execa and chrome-remote-interface to run latest versions [#1594](https://github.com/sitespeedio/browsertime/pull/1594).
|
|
1286
1301
|
## 12.9.0 - 2021-06-04
|
|
1287
1302
|
|
|
1288
1303
|
### Added
|
|
@@ -1384,9 +1399,9 @@ A special thanks to [Inderpartap Singh Cheema](https://github.com/inderpartap),
|
|
|
1384
1399
|
* New metrics: Delta between TTFB and First Contentful Paint, Largest Contentful paint and First visual change [#1528](https://github.com/sitespeedio/browsertime/pull/1528). You can use this if you have unstable TTFB and want to alert on front end metrics. Lets see when other also implement this :)
|
|
1385
1400
|
* Made it easier for people to get Google Web Vitals. We copy that data under the googleWebVitals namespace in the result JSON [#1521](https://github.com/sitespeedio/browsertime/pull/1521).
|
|
1386
1401
|
* Added TTFB as a single metric [#1522](https://github.com/sitespeedio/browsertime/pull/1522).
|
|
1387
|
-
* New stop watch command [#1512](https://github.com/sitespeedio/browsertime/pull/1512). Measure time by:
|
|
1388
|
-
```const timer = commands.stopWatch.get('my_timer');
|
|
1389
|
-
timer.start();
|
|
1402
|
+
* New stop watch command [#1512](https://github.com/sitespeedio/browsertime/pull/1512). Measure time by:
|
|
1403
|
+
```const timer = commands.stopWatch.get('my_timer');
|
|
1404
|
+
timer.start();
|
|
1390
1405
|
// Do something
|
|
1391
1406
|
// Stop the timer and add the result to the last tested URL
|
|
1392
1407
|
timer.stopAndAdd();
|
|
@@ -1447,8 +1462,8 @@ A special thanks to [Inderpartap Singh Cheema](https://github.com/inderpartap),
|
|
|
1447
1462
|
|
|
1448
1463
|
## 11.2.0 - 2021-01-24
|
|
1449
1464
|
### Added
|
|
1450
|
-
* Make it possible to listen to CDP events in scripting [#1473](https://github.com/sitespeedio/browsertime/pull/1473). There's a new command in scripting (for browsers that supports it): ```commands.cdp.on```. Here's an example to pickup all responses for a page :
|
|
1451
|
-
```
|
|
1465
|
+
* Make it possible to listen to CDP events in scripting [#1473](https://github.com/sitespeedio/browsertime/pull/1473). There's a new command in scripting (for browsers that supports it): ```commands.cdp.on```. Here's an example to pickup all responses for a page :
|
|
1466
|
+
```
|
|
1452
1467
|
const responses = [];
|
|
1453
1468
|
await commands.cdp.on('Network.responseReceived', params => {
|
|
1454
1469
|
responses.push(params);
|
|
@@ -1458,7 +1473,7 @@ A special thanks to [Inderpartap Singh Cheema](https://github.com/inderpartap),
|
|
|
1458
1473
|
```
|
|
1459
1474
|
## 11.1.2 - 2021-01-20
|
|
1460
1475
|
### Fixed
|
|
1461
|
-
* The last release didn't fix the problem when browsertime do not collect metrics.
|
|
1476
|
+
* The last release didn't fix the problem when browsertime do not collect metrics.
|
|
1462
1477
|
## 11.1.1 - 2021-01-20
|
|
1463
1478
|
### Fixed
|
|
1464
1479
|
* Added a guard if we do not collect any metrics [#1472](https://github.com/sitespeedio/browsertime/pull/1472).
|
|
@@ -1477,7 +1492,7 @@ A special thanks to [Inderpartap Singh Cheema](https://github.com/inderpartap),
|
|
|
1477
1492
|
* Setting path to Edge was broken, use `--edge.binaryPath` to point out the path to your Edge binary [#1461](https://github.com/sitespeedio/browsertime/pull/1461).
|
|
1478
1493
|
## 11.0.0 - 2020-12-18
|
|
1479
1494
|
### Changed
|
|
1480
|
-
* Record and keep the browser full screen (including URL bar) [#1435](https://github.com/sitespeedio/browsertime/pull/1435). All metrics should stay the same with this change but the video and the code will be easier :) When we implemented video a long time ago we wanted to cut out the URL bar but it made it harder to keep the video to look ok on different OS.
|
|
1495
|
+
* Record and keep the browser full screen (including URL bar) [#1435](https://github.com/sitespeedio/browsertime/pull/1435). All metrics should stay the same with this change but the video and the code will be easier :) When we implemented video a long time ago we wanted to cut out the URL bar but it made it harder to keep the video to look ok on different OS.
|
|
1481
1496
|
* Say goodbye to RUM Speed Index [#1439](https://github.com/sitespeedio/browsertime/pull/1439).
|
|
1482
1497
|
* Domain name on disk now uses underscore instead of dots in the name [#1445](https://github.com/sitespeedio/browsertime/pull/1445).
|
|
1483
1498
|
* Click the Android power button at the start of each test (instead of the home button [#1447](https://github.com/sitespeedio/browsertime/pull/1447).
|
|
@@ -1493,7 +1508,7 @@ A special thanks to [Inderpartap Singh Cheema](https://github.com/inderpartap),
|
|
|
1493
1508
|
* Add support using alias from CLI and use alias as folder name on disk [#1443](https://github.com/sitespeedio/browsertime/pull/1443).
|
|
1494
1509
|
* New option to store a more flat structure on disk converting the path part of the URL to one folder `--storeURLsAsFlatPageOnDisk`[#1450](https://github.com/sitespeedio/browsertime/pull/1450)
|
|
1495
1510
|
* Updated to Selenium 4.0.0-alpha.8 [#1451](https://github.com/sitespeedio/browsertime/pull/1451).
|
|
1496
|
-
* Updated to Firefox 84 in the Docker container.
|
|
1511
|
+
* Updated to Firefox 84 in the Docker container.
|
|
1497
1512
|
* Updated to Edgedriver 87
|
|
1498
1513
|
* Added Edge in the Docker container [#1458](https://github.com/sitespeedio/browsertime/pull/1458).
|
|
1499
1514
|
|
|
@@ -1505,12 +1520,12 @@ A special thanks to [Inderpartap Singh Cheema](https://github.com/inderpartap),
|
|
|
1505
1520
|
### Fixed
|
|
1506
1521
|
* The browsertime.json always included Firefox appConstants and the geckoprofiler JSON missed out on Visual Metrics, fixed in [#1434](https://github.com/sitespeedio/browsertime/pull/1434).
|
|
1507
1522
|
## 10.8.0 - 2020-11-18
|
|
1508
|
-
### Added
|
|
1523
|
+
### Added
|
|
1509
1524
|
* Updated to Firefox 83 in the Docker container.
|
|
1510
1525
|
* Updated Chrome and Chromedriver to 87.
|
|
1511
1526
|
## 10.7.0 - 2020-11-16
|
|
1512
1527
|
### Added
|
|
1513
|
-
* Add page generator tag to the HAR file [#1430](https://github.com/sitespeedio/browsertime/pull/1430)
|
|
1528
|
+
* Add page generator tag to the HAR file [#1430](https://github.com/sitespeedio/browsertime/pull/1430)
|
|
1514
1529
|
|
|
1515
1530
|
### Fixed
|
|
1516
1531
|
* Reverted to Geckodrover 0.27.0 since 0.28.0 cannot start Firefox on Android [#1431](https://github.com/sitespeedio/browsertime/pull/1431).
|
|
@@ -1579,7 +1594,7 @@ A special thanks to [Inderpartap Singh Cheema](https://github.com/inderpartap),
|
|
|
1579
1594
|
## 10.1.0 - 2020-09-22
|
|
1580
1595
|
|
|
1581
1596
|
### Added
|
|
1582
|
-
* Extra love for running tests in Android: Press the home button at the start of a test, verify that the phone state is "device" before starting to test (no need to run tests on offline devices) and
|
|
1597
|
+
* Extra love for running tests in Android: Press the home button at the start of a test, verify that the phone state is "device" before starting to test (no need to run tests on offline devices) and
|
|
1583
1598
|
added possibility to verify the internet connection on the device through ping (enable with `--androidVerifyNetwork`) [#1386](https://github.com/sitespeedio/browsertime/pull/1386).
|
|
1584
1599
|
|
|
1585
1600
|
### Fixed
|
|
@@ -1606,7 +1621,7 @@ The new 10.0 release mostly include technical changes that will make it easier f
|
|
|
1606
1621
|
### Tech
|
|
1607
1622
|
* Making a better structure for each browser, so its more understandable when you can run browser specific code. The old browser delegate (now only browser name) has the newly named functions:
|
|
1608
1623
|
* beforeBrowserStart
|
|
1609
|
-
* afterBrowserStart
|
|
1624
|
+
* afterBrowserStart
|
|
1610
1625
|
* beforeStartIteration
|
|
1611
1626
|
* beforeEachURL
|
|
1612
1627
|
* afterPageCompleteCheck
|
|
@@ -1615,7 +1630,7 @@ The new 10.0 release mostly include technical changes that will make it easier f
|
|
|
1615
1630
|
* getHARs
|
|
1616
1631
|
* beforeBrowserStop
|
|
1617
1632
|
|
|
1618
|
-
This makes it easier to make sure when to collect metrics, stop trace logs and do whatever you need. Implemented in [#1348](https://github.com/sitespeedio/browsertime/pull/1348) and [#1367](https://github.com/sitespeedio/browsertime/pull/1367).
|
|
1633
|
+
This makes it easier to make sure when to collect metrics, stop trace logs and do whatever you need. Implemented in [#1348](https://github.com/sitespeedio/browsertime/pull/1348) and [#1367](https://github.com/sitespeedio/browsertime/pull/1367).
|
|
1619
1634
|
|
|
1620
1635
|
* New structure for browser, trying to decrease line of code per file and making it easier to navigate the code and prepare for adding support for other browser drivers than Selenium [#1354](https://github.com/sitespeedio/browsertime/pull/1354) [#1355](https://github.com/sitespeedio/browsertime/pull/1355) [#1356](https://github.com/sitespeedio/browsertime/pull/1356).
|
|
1621
1636
|
|
|
@@ -1719,7 +1734,7 @@ This makes it easier to make sure when to collect metrics, stop trace logs and d
|
|
|
1719
1734
|
|
|
1720
1735
|
## 8.12.1 - 2020-05-19
|
|
1721
1736
|
### Fixed
|
|
1722
|
-
* Fixed so metrics in the CLI always shows two decimals [#1282](https://github.com/sitespeedio/browsertime/pull/1282).
|
|
1737
|
+
* Fixed so metrics in the CLI always shows two decimals [#1282](https://github.com/sitespeedio/browsertime/pull/1282).
|
|
1723
1738
|
* Adopt the rename of layout-instability-api to CLS and remove report in percentage since it do not make sense [#1283](https://github.com/sitespeedio/browsertime/pull/1283) and [#1284](https://github.com/sitespeedio/browsertime/pull/1284).
|
|
1724
1739
|
|
|
1725
1740
|
## 8.12.0 - 2020-05-12
|
|
@@ -1815,7 +1830,7 @@ All work in [#1234](https://github.com/sitespeedio/browsertime/pull/1234) and [#
|
|
|
1815
1830
|
## 8.3.0 - 2020-03-20
|
|
1816
1831
|
### Added
|
|
1817
1832
|
* Upgraded from selenium-4.0.0-alpha.5 to selenium-4.0.0-alpha.7 [#1221](https://github.com/sitespeedio/browsertime/pull/1221).
|
|
1818
|
-
* Added supported for unified scripts Thank you [Tarek Ziade](https://github.com/tarekziade) for the PR [#1220](https://github.com/sitespeedio/browsertime/pull/1220). Checkout [#1216](https://github.com/sitespeedio/browsertime/issues/1216) for more info.
|
|
1833
|
+
* Added supported for unified scripts Thank you [Tarek Ziade](https://github.com/tarekziade) for the PR [#1220](https://github.com/sitespeedio/browsertime/pull/1220). Checkout [#1216](https://github.com/sitespeedio/browsertime/issues/1216) for more info.
|
|
1819
1834
|
|
|
1820
1835
|
### Fixed
|
|
1821
1836
|
* Running Chrome in emulated mobile mode sometimes picked up Chromes info bar as First Visual Change. The default bottom margin was changed from 10 pixels to 16 pixels [#1224](https://github.com/sitespeedio/browsertime/pull/1224).
|
|
@@ -1867,7 +1882,7 @@ All work in [#1234](https://github.com/sitespeedio/browsertime/pull/1234) and [#
|
|
|
1867
1882
|
|
|
1868
1883
|
Woho Browsertime 8.0.0 is here!
|
|
1869
1884
|
|
|
1870
|
-
There's a lot of new things in 8.0.0. First: A big THANK YOU to all the people at Mozilla that have contributed with all the new stuff:
|
|
1885
|
+
There's a lot of new things in 8.0.0. First: A big THANK YOU to all the people at Mozilla that have contributed with all the new stuff:
|
|
1871
1886
|
* [Nick Alexander](https://github.com/ncalexan)
|
|
1872
1887
|
* [Denis Palmeiro](https://github.com/dpalmeiro)
|
|
1873
1888
|
* [Sean Feng](https://github.com/sefeng211)
|
|
@@ -1877,7 +1892,7 @@ There's a lot of new things in 8.0.0. First: A big THANK YOU to all the people a
|
|
|
1877
1892
|
* [Tarek Ziade](https://github.com/tarekziade)
|
|
1878
1893
|
* [Gregory Mierzwinski](https://github.com/gmierz)
|
|
1879
1894
|
|
|
1880
|
-
Major new things:
|
|
1895
|
+
Major new things:
|
|
1881
1896
|
* You can collect CPU profiles from Firefox with `--firefox.geckoProfiler` and view them at https://profiler.firefox.com !
|
|
1882
1897
|
* You can run Firefox on Android!
|
|
1883
1898
|
* Now the window recorder for Firefox works great. That means you can record a video of the loading of your page without using FFMPEG. Add `--firefox.windowRecorder` and `-video`to your run.
|
|
@@ -1901,7 +1916,7 @@ Lets go through all the new things. There's a couple things that changes:
|
|
|
1901
1916
|
* Start Firefox with a new profile cloned from a directory. Use this to pre-populate databases with
|
|
1902
1917
|
certificateY, tracking protectionlists etc `--firefox.profileTemplate`.
|
|
1903
1918
|
* Fixes so `--firefox.windowRecorder` works better (use it to record a video of the screen).
|
|
1904
|
-
* You can now choose the Activity hosting the Chrome WebView on Android using `--chrome.android.activity`. You can also name the process of the Activity hosting the WebView using `--chrome.android.process`.
|
|
1919
|
+
* You can now choose the Activity hosting the Chrome WebView on Android using `--chrome.android.activity`. You can also name the process of the Activity hosting the WebView using `--chrome.android.process`.
|
|
1905
1920
|
* Move visualmetrics.py to a python package [#1148](https://github.com/sitespeedio/browsertime/pull/1148) - thank you [Tarek Ziade](https://github.com/tarekziade)!
|
|
1906
1921
|
* Run Safari on iOS with just `-b safari --ios` [#1141](https://github.com/sitespeedio/browsertime/pull/1141)
|
|
1907
1922
|
* Enable verbose Chromedriver logging with `--chrome.enableVerboseChromeDriverLog` [#1152](https://github.com/sitespeedio/browsertime/pull/1152)
|
|
@@ -1923,9 +1938,9 @@ Lets go through all the new things. There's a couple things that changes:
|
|
|
1923
1938
|
|
|
1924
1939
|
### Fixed
|
|
1925
1940
|
* Ignore certificate errors by default when we record with WPR [#1150](https://github.com/sitespeedio/browsertime/pull/1150)
|
|
1926
|
-
* If Visual Metrics failed, the original error wasn't there in the log. Fixed by [#1149](https://github.com/sitespeedio/browsertime/pull/1149)
|
|
1941
|
+
* If Visual Metrics failed, the original error wasn't there in the log. Fixed by [#1149](https://github.com/sitespeedio/browsertime/pull/1149)
|
|
1927
1942
|
* Fix so the devtools port is added only one time on Android [#1145](https://github.com/sitespeedio/browsertime/pull/1145)
|
|
1928
|
-
* If Visual Metrics fails, let produce an error that ends up in the JSON [#1147](https://github.com/sitespeedio/browsertime/pull/1147)
|
|
1943
|
+
* If Visual Metrics fails, let produce an error that ends up in the JSON [#1147](https://github.com/sitespeedio/browsertime/pull/1147)
|
|
1929
1944
|
* Cleanup WPR code to use default page complete check [#1143](https://github.com/sitespeedio/browsertime/pull/1143)
|
|
1930
1945
|
* CDP bug when scripting, fixed in [#1153](https://github.com/sitespeedio/browsertime/pull/1153)
|
|
1931
1946
|
* If navigation never happens, make sure we log what's going on and fail hard by throwing an error [#1130](https://github.com/sitespeedio/browsertime/pull/1130).
|
|
@@ -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/lib/support/har/index.js
CHANGED
|
@@ -191,23 +191,29 @@ export function addCreator(har, comment) {
|
|
|
191
191
|
return har;
|
|
192
192
|
}
|
|
193
193
|
export function getMainDocumentTimings(har) {
|
|
194
|
-
|
|
195
|
-
|
|
194
|
+
// Sometimes the HAR is dirty
|
|
195
|
+
try {
|
|
196
|
+
const timings = [];
|
|
197
|
+
const entries = [...har.log.entries];
|
|
196
198
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
199
|
+
for (let page of har.log.pages) {
|
|
200
|
+
const pageId = page.id;
|
|
201
|
+
const url = page._url;
|
|
200
202
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
+
let pageEntries = [...entries];
|
|
204
|
+
const finalURL = getFinalURL(pageEntries, pageId);
|
|
203
205
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
206
|
+
pageEntries = pageEntries.filter(
|
|
207
|
+
entry => entry.pageref === pageId && entry.request.url === finalURL
|
|
208
|
+
);
|
|
207
209
|
|
|
208
|
-
|
|
210
|
+
timings.push({ url, timings: pageEntries[0].timings });
|
|
211
|
+
}
|
|
212
|
+
return timings;
|
|
213
|
+
} catch (error) {
|
|
214
|
+
log.error('Could not get main document timings ' + error);
|
|
215
|
+
return [];
|
|
209
216
|
}
|
|
210
|
-
return timings;
|
|
211
217
|
}
|
|
212
218
|
export function getFullyLoaded(har) {
|
|
213
219
|
const fullyLoaded = [];
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "browsertime",
|
|
3
3
|
"description": "Get performance metrics from your web page using Browsertime.",
|
|
4
|
-
"version": "24.
|
|
4
|
+
"version": "24.9.0",
|
|
5
5
|
"bin": "./bin/browsertime.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"types": "./types/scripting.d.ts",
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"@devicefarmer/adbkit": "3.3.8",
|
|
10
|
-
"@sitespeed.io/chromedriver": "
|
|
11
|
-
"@sitespeed.io/edgedriver": "
|
|
10
|
+
"@sitespeed.io/chromedriver": "138.0.7204-49",
|
|
11
|
+
"@sitespeed.io/edgedriver": "138.0.3351-55",
|
|
12
12
|
"@sitespeed.io/geckodriver": "0.36.0",
|
|
13
13
|
"@sitespeed.io/log": "0.2.6",
|
|
14
14
|
"@sitespeed.io/throttle": "5.0.1",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"fast-stats": "0.0.7",
|
|
20
20
|
"ff-test-bidi-har-export": "0.0.17",
|
|
21
21
|
"lodash.merge": "4.6.2",
|
|
22
|
-
"selenium-webdriver": "4.
|
|
22
|
+
"selenium-webdriver": "4.34.0",
|
|
23
23
|
"yargs": "17.7.2"
|
|
24
24
|
},
|
|
25
25
|
"optionalDependencies": {
|
|
@@ -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
|
)
|