Skip to content

[scout] Remove perf stats validation for Discover#215130

Merged
dmlemeshko merged 3 commits intoelastic:mainfrom
dmlemeshko:discover/remove-cdp-perf-metrics-validation
Mar 22, 2025
Merged

[scout] Remove perf stats validation for Discover#215130
dmlemeshko merged 3 commits intoelastic:mainfrom
dmlemeshko:discover/remove-cdp-perf-metrics-validation

Conversation

@dmlemeshko
Copy link
Contributor

@dmlemeshko dmlemeshko commented Mar 19, 2025

Summary

With #212397 we added 2 tests for Discover app (loading /app/discover) to track:

  • js bundles loaded on page
  • perf metrics like CPU time, Layout time and Script time fetched with CDP Performance Domain API

While the first test for bundles didn't report any failures, second test to validate Perf metrics fails periodically:

https://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34729#0195a4de-6cd5-4d1e-be11-5d02be6de2b0

Error: CPU time (seconds) usage during page navigation should not exceed 1.5 seconds

expect(received).toBeLessThan(expected)

Expected: < 1.5
Received:   1.591343

https://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34877

Error: Additional time spent executing JS scripts should not exceed 0.5 second

expect(received).toBeLessThan(expected)

Expected: < 0.5
Received:   0.601434

https://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34899

Error: Total layout computation time should not exceed 0.06 second

expect(received).toBeLessThan(expected)

Expected: < 0.06
Received:   0.061723

https://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34912#0195adb8-4536-42b7-ab4d-524535fdad9a

Error: Additional time spent executing JS scripts should not exceed 0.5 second

expect(received).toBeLessThan(expected)

Expected: < 0.5
Received:   0.561259

It was worth an experiment, but due to flakiness we decided to keep only bundles limits validation for now and see if it is stable in the long run.

If Data-Discovery team has interest in collecting Perf metrics without strict validation in PRs, we can discuss the options. Alternatively we can wait for Scout GA and you can deep dive into your own performance testing with Playwright/CDP.

@dmlemeshko dmlemeshko marked this pull request as ready for review March 19, 2025 17:08
@dmlemeshko dmlemeshko requested a review from a team as a code owner March 19, 2025 17:08
@dmlemeshko dmlemeshko added the release_note:skip Skip the PR/issue when compiling release notes label Mar 19, 2025
@dmlemeshko dmlemeshko enabled auto-merge (squash) March 21, 2025 18:35
@dmlemeshko dmlemeshko merged commit 4dc27ba into elastic:main Mar 22, 2025
10 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x, 9.0

https://github.com/elastic/kibana/actions/runs/14011290144

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.x Backport failed because of merge conflicts
9.0 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 215130

Questions ?

Please refer to the Backport tool documentation

dmlemeshko added a commit to dmlemeshko/kibana that referenced this pull request Mar 23, 2025
## Summary

With elastic#212397 we added 2 tests for Discover app (loading `/app/discover`)
to track:
- js bundles loaded on page
- perf metrics like CPU time, Layout time and Script time fetched with
CDP Performance Domain API

While the first test for bundles _didn't report any failures_, second
test to validate Perf metrics fails periodically:

https://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34729#0195a4de-6cd5-4d1e-be11-5d02be6de2b0
```
Error: CPU time (seconds) usage during page navigation should not exceed 1.5 seconds

expect(received).toBeLessThan(expected)

Expected: < 1.5
Received:   1.591343
```

https://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34877
```
Error: Additional time spent executing JS scripts should not exceed 0.5 second

expect(received).toBeLessThan(expected)

Expected: < 0.5
Received:   0.601434
```

https://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34899
```
Error: Total layout computation time should not exceed 0.06 second

expect(received).toBeLessThan(expected)

Expected: < 0.06
Received:   0.061723
```

https://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34912#0195adb8-4536-42b7-ab4d-524535fdad9a
```
Error: Additional time spent executing JS scripts should not exceed 0.5 second

expect(received).toBeLessThan(expected)

Expected: < 0.5
Received:   0.561259
```

It was worth an experiment, but due to flakiness we decided to keep only
bundles limits validation for now and see if it is stable in the long
run.

If Data-Discovery team has interest in collecting Perf metrics without
strict validation in PRs, we can discuss the options. Alternatively we
can wait for Scout GA and you can deep dive into your own performance
testing with Playwright/CDP.

(cherry picked from commit 4dc27ba)

# Conflicts:
#	x-pack/platform/plugins/private/discover_enhanced/ui_tests/tests/discover_cdp_perf.spec.ts
@dmlemeshko
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
9.0

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

dmlemeshko added a commit to dmlemeshko/kibana that referenced this pull request Mar 23, 2025
## Summary

With elastic#212397 we added 2 tests for Discover app (loading `/app/discover`)
to track:
- js bundles loaded on page
- perf metrics like CPU time, Layout time and Script time fetched with
CDP Performance Domain API

While the first test for bundles _didn't report any failures_, second
test to validate Perf metrics fails periodically:

https://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34729#0195a4de-6cd5-4d1e-be11-5d02be6de2b0
```
Error: CPU time (seconds) usage during page navigation should not exceed 1.5 seconds

expect(received).toBeLessThan(expected)

Expected: < 1.5
Received:   1.591343
```

https://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34877
```
Error: Additional time spent executing JS scripts should not exceed 0.5 second

expect(received).toBeLessThan(expected)

Expected: < 0.5
Received:   0.601434
```

https://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34899
```
Error: Total layout computation time should not exceed 0.06 second

expect(received).toBeLessThan(expected)

Expected: < 0.06
Received:   0.061723
```

https://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34912#0195adb8-4536-42b7-ab4d-524535fdad9a
```
Error: Additional time spent executing JS scripts should not exceed 0.5 second

expect(received).toBeLessThan(expected)

Expected: < 0.5
Received:   0.561259
```

It was worth an experiment, but due to flakiness we decided to keep only
bundles limits validation for now and see if it is stable in the long
run.

If Data-Discovery team has interest in collecting Perf metrics without
strict validation in PRs, we can discuss the options. Alternatively we
can wait for Scout GA and you can deep dive into your own performance
testing with Playwright/CDP.

(cherry picked from commit 4dc27ba)

# Conflicts:
#	x-pack/platform/plugins/private/discover_enhanced/ui_tests/tests/discover_cdp_perf.spec.ts
@dmlemeshko
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

dmlemeshko added a commit that referenced this pull request Mar 24, 2025
…15610)

# Backport

This will backport the following commits from `main` to `9.0`:
- [[scout] Remove perf stats validation for Discover
(#215130)](#215130)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Dzmitry
Lemechko","email":"dzmitry.lemechko@elastic.co"},"sourceCommit":{"committedDate":"2025-03-22T18:31:54Z","message":"[scout]
Remove perf stats validation for Discover (#215130)\n\n##
Summary\n\nWith #212397 we added 2 tests for Discover app (loading
`/app/discover`)\nto track:\n- js bundles loaded on page\n- perf metrics
like CPU time, Layout time and Script time fetched with\nCDP Performance
Domain API\n\nWhile the first test for bundles _didn't report any
failures_, second\ntest to validate Perf metrics fails
periodically:\n\n\nhttps://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34729#0195a4de-6cd5-4d1e-be11-5d02be6de2b0\n```\nError:
CPU time (seconds) usage during page navigation should not exceed 1.5
seconds\n\nexpect(received).toBeLessThan(expected)\n\nExpected: <
1.5\nReceived:
1.591343\n```\n\n\nhttps://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34877\n```\nError:
Additional time spent executing JS scripts should not exceed 0.5
second\n\nexpect(received).toBeLessThan(expected)\n\nExpected: <
0.5\nReceived:
0.601434\n```\n\n\nhttps://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34899\n```\nError:
Total layout computation time should not exceed 0.06
second\n\nexpect(received).toBeLessThan(expected)\n\nExpected: <
0.06\nReceived:
0.061723\n```\n\n\nhttps://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34912#0195adb8-4536-42b7-ab4d-524535fdad9a\n```\nError:
Additional time spent executing JS scripts should not exceed 0.5
second\n\nexpect(received).toBeLessThan(expected)\n\nExpected: <
0.5\nReceived: 0.561259\n```\n\nIt was worth an experiment, but due to
flakiness we decided to keep only\nbundles limits validation for now and
see if it is stable in the long\nrun.\n\nIf Data-Discovery team has
interest in collecting Perf metrics without\nstrict validation in PRs,
we can discuss the options. Alternatively we\ncan wait for Scout GA and
you can deep dive into your own performance\ntesting with
Playwright/CDP.","sha":"4dc27ba4aaa5bbc0a18a1964f58f2f63e2ccde16","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:version","test:scout","v9.1.0","v8.19.0"],"title":"[scout]
Remove perf stats validation for
Discover","number":215130,"url":"https://github.com/elastic/kibana/pull/215130","mergeCommit":{"message":"[scout]
Remove perf stats validation for Discover (#215130)\n\n##
Summary\n\nWith #212397 we added 2 tests for Discover app (loading
`/app/discover`)\nto track:\n- js bundles loaded on page\n- perf metrics
like CPU time, Layout time and Script time fetched with\nCDP Performance
Domain API\n\nWhile the first test for bundles _didn't report any
failures_, second\ntest to validate Perf metrics fails
periodically:\n\n\nhttps://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34729#0195a4de-6cd5-4d1e-be11-5d02be6de2b0\n```\nError:
CPU time (seconds) usage during page navigation should not exceed 1.5
seconds\n\nexpect(received).toBeLessThan(expected)\n\nExpected: <
1.5\nReceived:
1.591343\n```\n\n\nhttps://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34877\n```\nError:
Additional time spent executing JS scripts should not exceed 0.5
second\n\nexpect(received).toBeLessThan(expected)\n\nExpected: <
0.5\nReceived:
0.601434\n```\n\n\nhttps://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34899\n```\nError:
Total layout computation time should not exceed 0.06
second\n\nexpect(received).toBeLessThan(expected)\n\nExpected: <
0.06\nReceived:
0.061723\n```\n\n\nhttps://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34912#0195adb8-4536-42b7-ab4d-524535fdad9a\n```\nError:
Additional time spent executing JS scripts should not exceed 0.5
second\n\nexpect(received).toBeLessThan(expected)\n\nExpected: <
0.5\nReceived: 0.561259\n```\n\nIt was worth an experiment, but due to
flakiness we decided to keep only\nbundles limits validation for now and
see if it is stable in the long\nrun.\n\nIf Data-Discovery team has
interest in collecting Perf metrics without\nstrict validation in PRs,
we can discuss the options. Alternatively we\ncan wait for Scout GA and
you can deep dive into your own performance\ntesting with
Playwright/CDP.","sha":"4dc27ba4aaa5bbc0a18a1964f58f2f63e2ccde16"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/215130","number":215130,"mergeCommit":{"message":"[scout]
Remove perf stats validation for Discover (#215130)\n\n##
Summary\n\nWith #212397 we added 2 tests for Discover app (loading
`/app/discover`)\nto track:\n- js bundles loaded on page\n- perf metrics
like CPU time, Layout time and Script time fetched with\nCDP Performance
Domain API\n\nWhile the first test for bundles _didn't report any
failures_, second\ntest to validate Perf metrics fails
periodically:\n\n\nhttps://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34729#0195a4de-6cd5-4d1e-be11-5d02be6de2b0\n```\nError:
CPU time (seconds) usage during page navigation should not exceed 1.5
seconds\n\nexpect(received).toBeLessThan(expected)\n\nExpected: <
1.5\nReceived:
1.591343\n```\n\n\nhttps://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34877\n```\nError:
Additional time spent executing JS scripts should not exceed 0.5
second\n\nexpect(received).toBeLessThan(expected)\n\nExpected: <
0.5\nReceived:
0.601434\n```\n\n\nhttps://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34899\n```\nError:
Total layout computation time should not exceed 0.06
second\n\nexpect(received).toBeLessThan(expected)\n\nExpected: <
0.06\nReceived:
0.061723\n```\n\n\nhttps://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34912#0195adb8-4536-42b7-ab4d-524535fdad9a\n```\nError:
Additional time spent executing JS scripts should not exceed 0.5
second\n\nexpect(received).toBeLessThan(expected)\n\nExpected: <
0.5\nReceived: 0.561259\n```\n\nIt was worth an experiment, but due to
flakiness we decided to keep only\nbundles limits validation for now and
see if it is stable in the long\nrun.\n\nIf Data-Discovery team has
interest in collecting Perf metrics without\nstrict validation in PRs,
we can discuss the options. Alternatively we\ncan wait for Scout GA and
you can deep dive into your own performance\ntesting with
Playwright/CDP.","sha":"4dc27ba4aaa5bbc0a18a1964f58f2f63e2ccde16"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
JoseLuisGJ pushed a commit to JoseLuisGJ/kibana that referenced this pull request Mar 24, 2025
## Summary

With elastic#212397 we added 2 tests for Discover app (loading `/app/discover`)
to track:
- js bundles loaded on page
- perf metrics like CPU time, Layout time and Script time fetched with
CDP Performance Domain API

While the first test for bundles _didn't report any failures_, second
test to validate Perf metrics fails periodically:


https://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34729#0195a4de-6cd5-4d1e-be11-5d02be6de2b0
```
Error: CPU time (seconds) usage during page navigation should not exceed 1.5 seconds

expect(received).toBeLessThan(expected)

Expected: < 1.5
Received:   1.591343
```


https://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34877
```
Error: Additional time spent executing JS scripts should not exceed 0.5 second

expect(received).toBeLessThan(expected)

Expected: < 0.5
Received:   0.601434
```


https://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34899
```
Error: Total layout computation time should not exceed 0.06 second

expect(received).toBeLessThan(expected)

Expected: < 0.06
Received:   0.061723
```


https://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34912#0195adb8-4536-42b7-ab4d-524535fdad9a
```
Error: Additional time spent executing JS scripts should not exceed 0.5 second

expect(received).toBeLessThan(expected)

Expected: < 0.5
Received:   0.561259
```

It was worth an experiment, but due to flakiness we decided to keep only
bundles limits validation for now and see if it is stable in the long
run.

If Data-Discovery team has interest in collecting Perf metrics without
strict validation in PRs, we can discuss the options. Alternatively we
can wait for Scout GA and you can deep dive into your own performance
testing with Playwright/CDP.
@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Mar 25, 2025
@kibanamachine
Copy link
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

dmlemeshko added a commit that referenced this pull request Mar 26, 2025
…15611)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[scout] Remove perf stats validation for Discover
(#215130)](#215130)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Dzmitry
Lemechko","email":"dzmitry.lemechko@elastic.co"},"sourceCommit":{"committedDate":"2025-03-22T18:31:54Z","message":"[scout]
Remove perf stats validation for Discover (#215130)\n\n##
Summary\n\nWith #212397 we added 2 tests for Discover app (loading
`/app/discover`)\nto track:\n- js bundles loaded on page\n- perf metrics
like CPU time, Layout time and Script time fetched with\nCDP Performance
Domain API\n\nWhile the first test for bundles _didn't report any
failures_, second\ntest to validate Perf metrics fails
periodically:\n\n\nhttps://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34729#0195a4de-6cd5-4d1e-be11-5d02be6de2b0\n```\nError:
CPU time (seconds) usage during page navigation should not exceed 1.5
seconds\n\nexpect(received).toBeLessThan(expected)\n\nExpected: <
1.5\nReceived:
1.591343\n```\n\n\nhttps://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34877\n```\nError:
Additional time spent executing JS scripts should not exceed 0.5
second\n\nexpect(received).toBeLessThan(expected)\n\nExpected: <
0.5\nReceived:
0.601434\n```\n\n\nhttps://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34899\n```\nError:
Total layout computation time should not exceed 0.06
second\n\nexpect(received).toBeLessThan(expected)\n\nExpected: <
0.06\nReceived:
0.061723\n```\n\n\nhttps://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34912#0195adb8-4536-42b7-ab4d-524535fdad9a\n```\nError:
Additional time spent executing JS scripts should not exceed 0.5
second\n\nexpect(received).toBeLessThan(expected)\n\nExpected: <
0.5\nReceived: 0.561259\n```\n\nIt was worth an experiment, but due to
flakiness we decided to keep only\nbundles limits validation for now and
see if it is stable in the long\nrun.\n\nIf Data-Discovery team has
interest in collecting Perf metrics without\nstrict validation in PRs,
we can discuss the options. Alternatively we\ncan wait for Scout GA and
you can deep dive into your own performance\ntesting with
Playwright/CDP.","sha":"4dc27ba4aaa5bbc0a18a1964f58f2f63e2ccde16","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:version","test:scout","v9.1.0","v8.19.0"],"title":"[scout]
Remove perf stats validation for
Discover","number":215130,"url":"https://github.com/elastic/kibana/pull/215130","mergeCommit":{"message":"[scout]
Remove perf stats validation for Discover (#215130)\n\n##
Summary\n\nWith #212397 we added 2 tests for Discover app (loading
`/app/discover`)\nto track:\n- js bundles loaded on page\n- perf metrics
like CPU time, Layout time and Script time fetched with\nCDP Performance
Domain API\n\nWhile the first test for bundles _didn't report any
failures_, second\ntest to validate Perf metrics fails
periodically:\n\n\nhttps://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34729#0195a4de-6cd5-4d1e-be11-5d02be6de2b0\n```\nError:
CPU time (seconds) usage during page navigation should not exceed 1.5
seconds\n\nexpect(received).toBeLessThan(expected)\n\nExpected: <
1.5\nReceived:
1.591343\n```\n\n\nhttps://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34877\n```\nError:
Additional time spent executing JS scripts should not exceed 0.5
second\n\nexpect(received).toBeLessThan(expected)\n\nExpected: <
0.5\nReceived:
0.601434\n```\n\n\nhttps://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34899\n```\nError:
Total layout computation time should not exceed 0.06
second\n\nexpect(received).toBeLessThan(expected)\n\nExpected: <
0.06\nReceived:
0.061723\n```\n\n\nhttps://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34912#0195adb8-4536-42b7-ab4d-524535fdad9a\n```\nError:
Additional time spent executing JS scripts should not exceed 0.5
second\n\nexpect(received).toBeLessThan(expected)\n\nExpected: <
0.5\nReceived: 0.561259\n```\n\nIt was worth an experiment, but due to
flakiness we decided to keep only\nbundles limits validation for now and
see if it is stable in the long\nrun.\n\nIf Data-Discovery team has
interest in collecting Perf metrics without\nstrict validation in PRs,
we can discuss the options. Alternatively we\ncan wait for Scout GA and
you can deep dive into your own performance\ntesting with
Playwright/CDP.","sha":"4dc27ba4aaa5bbc0a18a1964f58f2f63e2ccde16"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/215610","number":215610,"state":"OPEN"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/215130","number":215130,"mergeCommit":{"message":"[scout]
Remove perf stats validation for Discover (#215130)\n\n##
Summary\n\nWith #212397 we added 2 tests for Discover app (loading
`/app/discover`)\nto track:\n- js bundles loaded on page\n- perf metrics
like CPU time, Layout time and Script time fetched with\nCDP Performance
Domain API\n\nWhile the first test for bundles _didn't report any
failures_, second\ntest to validate Perf metrics fails
periodically:\n\n\nhttps://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34729#0195a4de-6cd5-4d1e-be11-5d02be6de2b0\n```\nError:
CPU time (seconds) usage during page navigation should not exceed 1.5
seconds\n\nexpect(received).toBeLessThan(expected)\n\nExpected: <
1.5\nReceived:
1.591343\n```\n\n\nhttps://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34877\n```\nError:
Additional time spent executing JS scripts should not exceed 0.5
second\n\nexpect(received).toBeLessThan(expected)\n\nExpected: <
0.5\nReceived:
0.601434\n```\n\n\nhttps://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34899\n```\nError:
Total layout computation time should not exceed 0.06
second\n\nexpect(received).toBeLessThan(expected)\n\nExpected: <
0.06\nReceived:
0.061723\n```\n\n\nhttps://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34912#0195adb8-4536-42b7-ab4d-524535fdad9a\n```\nError:
Additional time spent executing JS scripts should not exceed 0.5
second\n\nexpect(received).toBeLessThan(expected)\n\nExpected: <
0.5\nReceived: 0.561259\n```\n\nIt was worth an experiment, but due to
flakiness we decided to keep only\nbundles limits validation for now and
see if it is stable in the long\nrun.\n\nIf Data-Discovery team has
interest in collecting Perf metrics without\nstrict validation in PRs,
we can discuss the options. Alternatively we\ncan wait for Scout GA and
you can deep dive into your own performance\ntesting with
Playwright/CDP.","sha":"4dc27ba4aaa5bbc0a18a1964f58f2f63e2ccde16"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Mar 26, 2025
cqliu1 pushed a commit to cqliu1/kibana that referenced this pull request Mar 31, 2025
## Summary

With elastic#212397 we added 2 tests for Discover app (loading `/app/discover`)
to track:
- js bundles loaded on page
- perf metrics like CPU time, Layout time and Script time fetched with
CDP Performance Domain API

While the first test for bundles _didn't report any failures_, second
test to validate Perf metrics fails periodically:


https://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34729#0195a4de-6cd5-4d1e-be11-5d02be6de2b0
```
Error: CPU time (seconds) usage during page navigation should not exceed 1.5 seconds

expect(received).toBeLessThan(expected)

Expected: < 1.5
Received:   1.591343
```


https://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34877
```
Error: Additional time spent executing JS scripts should not exceed 0.5 second

expect(received).toBeLessThan(expected)

Expected: < 0.5
Received:   0.601434
```


https://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34899
```
Error: Total layout computation time should not exceed 0.06 second

expect(received).toBeLessThan(expected)

Expected: < 0.06
Received:   0.061723
```


https://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34912#0195adb8-4536-42b7-ab4d-524535fdad9a
```
Error: Additional time spent executing JS scripts should not exceed 0.5 second

expect(received).toBeLessThan(expected)

Expected: < 0.5
Received:   0.561259
```

It was worth an experiment, but due to flakiness we decided to keep only
bundles limits validation for now and see if it is stable in the long
run.

If Data-Discovery team has interest in collecting Perf metrics without
strict validation in PRs, we can discuss the options. Alternatively we
can wait for Scout GA and you can deep dive into your own performance
testing with Playwright/CDP.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes test:scout v8.19.0 v9.0.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants