Skip to content

Conversation

@cacieprins
Copy link
Contributor

@cacieprins cacieprins commented Nov 12, 2025

Additional details

If CYPRESS_INTERNAL_COMMAND_PERFORMANCE_LOGGING is enabled, Cypress will:

  • Create a new csv file at ./cypress/logs/performance-${UUID}.log. The random UUID is generated when the run begins.
  • Append performance data to this file for every command:
    • startTime - when the Command Queue began executing the command
    • duration - How long the command took to execute
    • name - The name of the command

Steps to test

How has the user experience changed?

PR Tasks


Note

Adds env-gated logging of each command’s execution timing to a CSV file and wires it through driver → automation (CDP/BiDi) → server.

  • Performance logging (opt-in via CYPRESS_INTERNAL_COMMAND_PERFORMANCE_LOGGING):
    • Driver: make runCommand async, measure startTime/duration, capture numElements, and emit Cypress.automation('log:command:performance', ...) from command_queue.ts.
    • Server: add record_performance_entry to append CSV rows to ./cypress/logs/performance.log (path override via CYPRESS_INTERNAL_PERFORMANCE_LOG_FILE_PATH) and initialize file on mode start (modes/index.ts).
    • Automation:
      • Wire new command log:command:performance through generic automation, plus CDP (cdp_automation.ts) and BiDi (bidi_automation.ts) handlers.
      • Extend types with CommandPerformanceEntry and new automation command in @packages/types.
    • Changelog: document the new benchmarking capability and default log location.

Written by Cursor Bugbot for commit d80bf84. This will update automatically on new commits. Configure here.

@cacieprins cacieprins marked this pull request as ready for review November 12, 2025 20:03
cli/CHANGELOG.md Outdated

- 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)
Copy link
Member

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.

Copy link
Contributor Author

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My comment was purely about the name of the env var having CYPRESS_INTERNAL at the beginning - as we only use this for internal env vars, like CYPRESS_INTERNAL_ENV. I would name is CYPRESS_COMMAND_PERFORMANCE_LOGGING.

@cypress
Copy link

cypress bot commented Nov 12, 2025

cypress    Run #68114

Run Properties:  status check passed Passed #68114  •  git commit 0a353b408a: Merge branch 'develop' into csv-benchmark
Project cypress
Branch Review csv-benchmark
Run status status check passed Passed #68114
Run duration 19m 41s
Commit git commit 0a353b408a: Merge branch 'develop' into csv-benchmark
Committer Jennifer Shehane
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 8
Tests that did not run due to a developer annotating a test with .skip  Pending 1098
Tests that did not run due to a failure in a mocha hook  Skipped 4
Tests that passed  Passing 26989
View all changes introduced in this branch ↗︎

Warning

Partial Report: The results for the Application Quality reports may be incomplete.

UI Coverage  45.18%
  Untested elements 194  
  Tested elements 164  
Accessibility  97.93%
  Failed rules  4 critical   8 serious   3 moderate   2 minor
  Failed elements 102  

@cacieprins cacieprins marked this pull request as draft November 13, 2025 16:38
@cacieprins cacieprins marked this pull request as ready for review December 17, 2025 18:11
@jennifer-shehane jennifer-shehane self-requested a review December 17, 2025 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Visibility performance: command benchmarking

3 participants