@applitools/eyes-storybook 3.66.0 → 3.67.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,5 +1,80 @@
1
1
  # Changelog
2
2
 
3
+ ## [3.67.0](https://github.com/Applitools-Dev/sdk/compare/js/eyes-storybook@3.66.0...js/eyes-storybook@3.67.0) (2026-06-28)
4
+
5
+
6
+ ### Features
7
+
8
+ * per-phase timing in the summary event | AD-14515 ([#3942](https://github.com/Applitools-Dev/sdk/issues/3942)) ([3704a6d](https://github.com/Applitools-Dev/sdk/commit/3704a6d60f07e4338f3d0c5fa1589baf89b45080))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * @applitools/utils bumped to 1.15.1
14
+ #### Bug Fixes
15
+
16
+ * updated extract git fallback logic | FLD-4492 ([#3831](https://github.com/Applitools-Dev/sdk/issues/3831)) ([0d98f3c](https://github.com/Applitools-Dev/sdk/commit/0d98f3cdf828eff756ffbfc5d4cdff7b19a20557))
17
+ * @applitools/logger bumped to 2.3.0
18
+ #### Features
19
+
20
+ * stream SDK logs to Azure Blob per server flag | AD-13401 ([#3849](https://github.com/Applitools-Dev/sdk/issues/3849)) ([7f9dfec](https://github.com/Applitools-Dev/sdk/commit/7f9dfecd874aefc33104db015451a22eee500324))
21
+
22
+
23
+
24
+ * @applitools/core-base bumped to 1.36.0
25
+ #### Features
26
+
27
+ * stream SDK logs to Azure Blob per server flag | AD-13401 ([#3849](https://github.com/Applitools-Dev/sdk/issues/3849)) ([7f9dfec](https://github.com/Applitools-Dev/sdk/commit/7f9dfecd874aefc33104db015451a22eee500324))
28
+
29
+
30
+
31
+ * @applitools/dom-snapshot bumped to 4.17.5
32
+
33
+ * @applitools/socket bumped to 1.3.15
34
+
35
+ * @applitools/req bumped to 1.11.2
36
+
37
+ * @applitools/image bumped to 1.2.13
38
+
39
+ * @applitools/dom-capture bumped to 11.8.3
40
+
41
+ * @applitools/driver bumped to 1.26.5
42
+
43
+ * @applitools/spec-driver-webdriver bumped to 1.6.5
44
+
45
+ * @applitools/spec-driver-selenium bumped to 1.8.5
46
+
47
+ * @applitools/spec-driver-playwright bumped to 1.9.5
48
+
49
+ * @applitools/spec-driver-puppeteer bumped to 1.8.5
50
+
51
+ * @applitools/screenshoter bumped to 3.12.24
52
+
53
+ * @applitools/nml-client bumped to 1.11.34
54
+
55
+ * @applitools/tunnel-client bumped to 1.12.2
56
+
57
+ * @applitools/ufg-client bumped to 1.22.5
58
+
59
+ * @applitools/ec-client bumped to 1.12.36
60
+
61
+ * @applitools/core bumped to 4.66.0
62
+ #### Features
63
+
64
+ * stream SDK logs to Azure Blob per server flag | AD-13401 ([#3849](https://github.com/Applitools-Dev/sdk/issues/3849)) ([7f9dfec](https://github.com/Applitools-Dev/sdk/commit/7f9dfecd874aefc33104db015451a22eee500324))
65
+
66
+
67
+ #### Bug Fixes
68
+
69
+ * updated extract git fallback logic | FLD-4492 ([#3831](https://github.com/Applitools-Dev/sdk/issues/3831)) ([0d98f3c](https://github.com/Applitools-Dev/sdk/commit/0d98f3cdf828eff756ffbfc5d4cdff7b19a20557))
70
+
71
+
72
+
73
+ * @applitools/eyes bumped to 1.43.5
74
+
75
+ * @applitools/test-server bumped to 1.4.6
76
+
77
+
3
78
  ## [3.66.0](https://github.com/Applitools-Dev/sdk/compare/js/eyes-storybook@3.65.8...js/eyes-storybook@3.66.0) (2026-06-18)
4
79
 
5
80
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/eyes-storybook",
3
- "version": "3.66.0",
3
+ "version": "3.67.0",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "applitools",
@@ -60,15 +60,15 @@
60
60
  "up:framework": "cd test/fixtures/storybook-versions/${APPLITOOLS_FRAMEWORK_VERSION} && npm ci"
61
61
  },
62
62
  "dependencies": {
63
- "@applitools/core": "4.65.2",
64
- "@applitools/driver": "1.26.4",
65
- "@applitools/eyes": "1.43.4",
63
+ "@applitools/core": "4.66.0",
64
+ "@applitools/driver": "1.26.5",
65
+ "@applitools/eyes": "1.43.5",
66
66
  "@applitools/functional-commons": "1.6.0",
67
- "@applitools/logger": "2.2.13",
67
+ "@applitools/logger": "2.3.0",
68
68
  "@applitools/monitoring-commons": "1.0.19",
69
- "@applitools/spec-driver-puppeteer": "1.8.4",
70
- "@applitools/ufg-client": "1.22.4",
71
- "@applitools/utils": "1.15.0",
69
+ "@applitools/spec-driver-puppeteer": "1.8.5",
70
+ "@applitools/ufg-client": "1.22.5",
71
+ "@applitools/utils": "1.15.1",
72
72
  "@inquirer/prompts": "7.0.1",
73
73
  "boxen": "4.2.0",
74
74
  "chalk": "3.0.0",
@@ -84,7 +84,7 @@
84
84
  "devDependencies": {
85
85
  "@applitools/bongo": "^5.10.0",
86
86
  "@applitools/snaptdout": "^1.1.1",
87
- "@applitools/test-server": "^1.4.5",
87
+ "@applitools/test-server": "^1.4.6",
88
88
  "@applitools/test-utils": "^1.5.17",
89
89
  "@storybook/addon-interactions": "^6.4.18",
90
90
  "@storybook/react": "^6.5.16",
@@ -54,6 +54,9 @@ function buildExecutionSummaryEvent({
54
54
  totalRunMs,
55
55
  renderStoriesMs,
56
56
  perStoryTotalMs: metrics.timing?.perStoryTotalMs,
57
+ snapshotMs: metrics.timing?.snapshotMs,
58
+ openMs: metrics.timing?.openMs,
59
+ checkAndCloseMs: metrics.timing?.checkAndCloseMs,
57
60
  },
58
61
  memory: metrics.memory,
59
62
  tabs: {
@@ -253,6 +253,8 @@ async function eyesStorybook({
253
253
  appName: config.appName,
254
254
  serverSettings: account.eyesServer,
255
255
  signal,
256
+ recordOpenTime: metrics.recordOpenTime,
257
+ recordCheckAndCloseTime: metrics.recordCheckAndCloseTime,
256
258
  });
257
259
 
258
260
  const renderStories = makeRenderStories({
@@ -266,6 +268,7 @@ async function eyesStorybook({
266
268
  eventEmitter,
267
269
  signal,
268
270
  recordStoryTime: metrics.recordStoryTime,
271
+ recordSnapshotTime: metrics.recordSnapshotTime,
269
272
  });
270
273
 
271
274
  logger.log('finished creating functions');
@@ -18,6 +18,7 @@ function makeRenderStories({
18
18
  eventEmitter = new EventEmitter(),
19
19
  signal = new AbortController().signal,
20
20
  recordStoryTime = () => {},
21
+ recordSnapshotTime = () => {},
21
22
  }) {
22
23
  const sparePages = {
23
24
  queue: [],
@@ -147,6 +148,7 @@ function makeRenderStories({
147
148
  // unlike performance[baselineName] which covers only open + checkAndClose.
148
149
  const storyStart = Date.now();
149
150
  try {
151
+ const snapshotStart = Date.now();
150
152
  let [error, storyData] = await presult(
151
153
  getStoryData({
152
154
  story,
@@ -155,6 +157,7 @@ function makeRenderStories({
155
157
  pageId,
156
158
  }),
157
159
  );
160
+ recordSnapshotTime(Date.now() - snapshotStart);
158
161
 
159
162
  if (
160
163
  error &&
@@ -14,6 +14,8 @@ function makeRenderStory({
14
14
  serverSettings,
15
15
  concurrency,
16
16
  signal = new AbortController().signal,
17
+ recordOpenTime = () => {},
18
+ recordCheckAndCloseTime = () => {},
17
19
  }) {
18
20
  const throttle = throat(storyDataGap);
19
21
  return function renderStory({story, snapshots, url}) {
@@ -26,7 +28,9 @@ function makeRenderStory({
26
28
  const checkParams = storyToCheckSettings({story, url});
27
29
 
28
30
  return timeItAsync(baselineName, async () => {
31
+ const openStart = Date.now();
29
32
  const eyes = await openEyes({settings: openParams});
33
+ recordOpenTime(Date.now() - openStart);
30
34
  return new Promise(async (resolve, reject) => {
31
35
  if (signal.aborted) {
32
36
  return await abortStory();
@@ -36,11 +40,13 @@ function makeRenderStory({
36
40
  throttle(async () => {
37
41
  try {
38
42
  if (snapshots) {
43
+ const checkStart = Date.now();
39
44
  await eyes.checkAndClose({
40
45
  target: snapshots,
41
46
  settings: checkParams,
42
47
  });
43
48
  const results = await eyes.getResults();
49
+ recordCheckAndCloseTime(Date.now() - checkStart);
44
50
  resolve(results);
45
51
  } else {
46
52
  await eyes.abort({settings: {environments: checkParams.environments}});
package/src/runMetrics.js CHANGED
@@ -12,21 +12,25 @@ const utils = require('@applitools/utils');
12
12
  const SAMPLE_INTERVAL_MS = 2000;
13
13
 
14
14
  function makeStats() {
15
- let count = 0;
16
- let sum = 0;
17
- let min = Infinity;
18
- let max = -Infinity;
15
+ const samples = [];
19
16
  return {
20
17
  add(n) {
21
- if (typeof n !== 'number' || !Number.isFinite(n)) return;
22
- count += 1;
23
- sum += n;
24
- if (n < min) min = n;
25
- if (n > max) max = n;
18
+ if (typeof n === 'number' && Number.isFinite(n)) samples.push(n);
26
19
  },
27
20
  summary() {
28
- if (count === 0) return null;
29
- return {min, max, avg: Math.round(sum / count), samples: count};
21
+ if (samples.length === 0) return null;
22
+ const sorted = [...samples].sort((a, b) => a - b);
23
+ const n = sorted.length;
24
+ const sum = sorted.reduce((a, b) => a + b, 0);
25
+ const mid = Math.floor(n / 2);
26
+ return {
27
+ min: sorted[0],
28
+ max: sorted[n - 1],
29
+ avg: Math.round(sum / n),
30
+ median: n % 2 ? sorted[mid] : Math.round((sorted[mid - 1] + sorted[mid]) / 2),
31
+ p95: sorted[Math.ceil(n * 0.95) - 1],
32
+ samples: n,
33
+ };
30
34
  },
31
35
  };
32
36
  }
@@ -41,6 +45,9 @@ function makeRunMetrics({browser, logger} = {}) {
41
45
  const nodeHeapUsed = makeStats();
42
46
  const browserTreeRss = makeStats();
43
47
  const perStoryTotalMs = makeStats();
48
+ const snapshotMs = makeStats();
49
+ const openMs = makeStats();
50
+ const checkAndCloseMs = makeStats();
44
51
  const counters = {tabsCrashed: 0, tabsReplaced: 0};
45
52
 
46
53
  let timer;
@@ -90,6 +97,18 @@ function makeRunMetrics({browser, logger} = {}) {
90
97
  perStoryTotalMs.add(ms);
91
98
  }
92
99
 
100
+ function recordSnapshotTime(ms) {
101
+ snapshotMs.add(ms);
102
+ }
103
+
104
+ function recordOpenTime(ms) {
105
+ openMs.add(ms);
106
+ }
107
+
108
+ function recordCheckAndCloseTime(ms) {
109
+ checkAndCloseMs.add(ms);
110
+ }
111
+
93
112
  function incrementTabsCrashed() {
94
113
  counters.tabsCrashed += 1;
95
114
  }
@@ -116,6 +135,9 @@ function makeRunMetrics({browser, logger} = {}) {
116
135
  },
117
136
  timing: {
118
137
  perStoryTotalMs: perStoryTotalMs.summary(),
138
+ snapshotMs: snapshotMs.summary(),
139
+ openMs: openMs.summary(),
140
+ checkAndCloseMs: checkAndCloseMs.summary(),
119
141
  },
120
142
  tabs: {...counters},
121
143
  };
@@ -125,6 +147,9 @@ function makeRunMetrics({browser, logger} = {}) {
125
147
  start,
126
148
  stop,
127
149
  recordStoryTime,
150
+ recordSnapshotTime,
151
+ recordOpenTime,
152
+ recordCheckAndCloseTime,
128
153
  incrementTabsCrashed,
129
154
  incrementTabsReplaced,
130
155
  summarize,