-
Notifications
You must be signed in to change notification settings - Fork 3.4k
misc: write command durations to a csv file #32938
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
packages/server/lib/automation/commands/record_performance_entry.ts
Outdated
Show resolved
Hide resolved
packages/server/lib/automation/commands/record_performance_entry.ts
Outdated
Show resolved
Hide resolved
|
|
||
| - The keyboard shortcuts modal now displays the keyboard shortcut for saving Studio changes - `⌘` + `s` for Mac or `Ctrl` + `s` for Windows/Linux. Addressed [#32862](https://github.com/cypress-io/cypress/issues/32862). Addressed in [#32864](https://github.com/cypress-io/cypress/pull/32864). | ||
| - The Cursor logo now correctly displays in the External editor dropdown. Addresses [#32062](https://github.com/cypress-io/cypress/issues/32062). Addressed in [#32911](https://github.com/cypress-io/cypress/pull/32911). | ||
| - Command execution can be benchmarked by setting the `CYPRESS_INTERNAL_COMMAND_PERFORMANCE_LOGGING` environment variable to `1` or `true`. The performance log is recorded to `./cypress/logs/performance.log` by default. Addressed in [#32938](https://github.com/cypress-io/cypress/pull/32938) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cacieprins If this is meant to be a user facing feature - I would not prefix this with CYPRESS_INTERNAL as that is used for truly internal env vars that users should never set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think if it's something we want user-facing, it should be a config entry - but that's out of scope for this, I think. This is to prep for benchmarking visibility approaches
cypress
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| Project |
cypress
|
| Branch Review |
csv-benchmark
|
| Run status |
|
| Run duration | 19m 34s |
| Commit |
|
| Committer | Cacie Prins |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
6
|
|
|
11
|
|
|
1098
|
|
|
4
|
|
|
26691
|
| View all changes introduced in this branch ↗︎ | |
Warning
Partial Report: The results for the Application Quality reports may be incomplete.
UI Coverage
45.76%
|
|
|---|---|
|
|
187
|
|
|
162
|
Accessibility
98%
|
|
|---|---|
|
|
4 critical
8 serious
2 moderate
2 minor
|
|
|
101
|
Tests for review
commands/location.cy.js • 1 failed test • 5x-driver-electron
| Test | Artifacts | |
|---|---|---|
| src/cy/commands/location > #location > eventually returns a given key |
Test Replay
|
|
commands/location.cy.js • 1 failed test • 5x-driver-chrome:beta
| Test | Artifacts | |
|---|---|---|
| src/cy/commands/location > #location > eventually returns a given key |
Test Replay
|
|
commands/location.cy.js • 1 failed test • 5x-driver-firefox
packages/server/lib/automation/commands/record_performance_entry.ts
Outdated
Show resolved
Hide resolved
packages/server/lib/automation/commands/record_performance_entry.ts
Outdated
Show resolved
Hide resolved
… log writer more resiliant
Additional details
If
CYPRESS_INTERNAL_COMMAND_PERFORMANCE_LOGGINGis enabled, Cypress will:./cypress/logs/performance.log, or$CYPRESS_INTERNAL_PERFORMANCE_LOG_FILE_PATH/performance.logifCYPRESS_INTERNAL_PERFORMANCE_LOG_FILE_PATHis set. This file is overwritten each time Cypress starts.startTime- when the Command Queue began executing the commandduration- How long the command took to executename- The name of the commandnumElements- the number of elements associated with the command (for queries, this is the number of elements that match the query)runnableTitle- the title of the runnable that enqueued the commandspec- the filename of the spec that included the runnableSteps to test
How has the user experience changed?
PR Tasks
cypress-documentation?type definitions?Note
Adds env-gated logging of each command’s execution timing to a CSV file and wires it through driver → automation (CDP/BiDi) → server.
CYPRESS_INTERNAL_COMMAND_PERFORMANCE_LOGGING):runCommandasync, measurestartTime/duration, capturenumElements, and emitCypress.automation('log:command:performance', ...)fromcommand_queue.ts.record_performance_entryto append CSV rows to./cypress/logs/performance.log(path override viaCYPRESS_INTERNAL_PERFORMANCE_LOG_FILE_PATH) and initialize file on mode start (modes/index.ts).log:command:performancethrough generic automation, plus CDP (cdp_automation.ts) and BiDi (bidi_automation.ts) handlers.CommandPerformanceEntryand new automation command in@packages/types.Written by Cursor Bugbot for commit d80bf84. This will update automatically on new commits. Configure here.