browsertime 21.3.1 → 21.4.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 CHANGED
@@ -1,8 +1,13 @@
1
1
  # Browsertime changelog (we do [semantic versioning](https://semver.org))
2
2
 
3
+ ## 21.4.0 - 2024-03-08
4
+ * Added the following trace categories for Chrome that now is used by default when you turn on the timeline: 'disabled-by-default-devtools.timeline.frame', 'disabled-by-default-devtools.timeline.invalidationTracking','loading', 'latencyInfo' - done in [#2086](https://github.com/sitespeedio/browsertime/pull/2086).
5
+ * Added a simple Loaf-script to get the 10 largest loaf. Lets iterate over the script and see how we can get the most useful information from it [#2087](https://github.com/sitespeedio/browsertime/pull/2087).
6
+
3
7
  ## 21.3.1 - 2024-02-26
4
8
  ### Fixed
5
9
  * Updated Chromedriver install with new version that fixes the Windows install [#2084](https://github.com/sitespeedio/browsertime/pull/2084).
10
+ * Updated to Selenium 4.18.1 [#2082](https://github.com/sitespeedio/browsertime/pull/2082).
6
11
 
7
12
  ## 21.3.0 - 2024-02-21
8
13
  ### Added
@@ -0,0 +1,36 @@
1
+ (function() {
2
+ // See https://developer.chrome.com/docs/web-platform/long-animation-frames
3
+ if (PerformanceObserver.supportedEntryTypes.includes('long-animation-frame')) {
4
+
5
+ const MAX_LOAFS_TO_CONSIDER = 10;
6
+ const relevantLoadEntries = [];
7
+ const observer = new PerformanceObserver(list => {
8
+ let longestBlockingLoAFs = [].concat(list.getEntries()).sort(
9
+ (a, b) => b.blockingDuration - a.blockingDuration
10
+ ).slice(0, MAX_LOAFS_TO_CONSIDER);
11
+
12
+ // re-package
13
+ for (let entry of longestBlockingLoAFs) {
14
+ const info = {};
15
+ info.blockingDuration = entry.blockingDuration;
16
+ info.duration = entry.duration;
17
+ info.styleAndLayoutStart = entry.styleAndLayoutStart;
18
+ info.renderStart = entry.renderStart;
19
+ info.scripts = [];
20
+ for (let script of entry.scripts) {
21
+ const s = {};
22
+ s.forcedStyleAndLayoutDuration = script.forcedStyleAndLayoutDuration;
23
+ s.invoker = script.invoker;
24
+ s.invokerType = script.invokerType;
25
+ s.sourceFunctionName = script.sourceFunctionName;
26
+ s.sourceURL = script.sourceURL;
27
+ info.scripts.push(s);
28
+ }
29
+ relevantLoadEntries.push(info);
30
+ }
31
+ return relevantLoadEntries;
32
+ });
33
+ observer.observe({ type: 'long-animation-frame', buffered: true });
34
+ }
35
+ })();
36
+
@@ -9,5 +9,9 @@ export const traceCategories = [
9
9
  'blink.user_timing',
10
10
  'devtools.timeline',
11
11
  'disabled-by-default-devtools.timeline',
12
- 'disabled-by-default-devtools.timeline.stack'
12
+ 'disabled-by-default-devtools.timeline.stack',
13
+ 'disabled-by-default-devtools.timeline.frame',
14
+ 'disabled-by-default-devtools.timeline.invalidationTracking',
15
+ 'loading',
16
+ 'latencyInfo'
13
17
  ];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "browsertime",
3
3
  "description": "Get performance metrics from your web page using Browsertime.",
4
- "version": "21.3.1",
4
+ "version": "21.4.0",
5
5
  "bin": "./bin/browsertime.js",
6
6
  "type": "module",
7
7
  "types": "./types/scripting.d.ts",