Skip to content

Conversation

@cacieprins
Copy link
Contributor

@cacieprins cacieprins commented Nov 12, 2025

  • Closes

Additional details

If CYPRESS_INTERNAL_COMMAND_PERFORMANCE_LOGGING is enabled, Cypress will:

  • Create a new csv file at ./cypress/logs/performance.log, or $CYPRESS_INTERNAL_PERFORMANCE_LOG_FILE_PATH/performance.log if CYPRESS_INTERNAL_PERFORMANCE_LOG_FILE_PATH is set. This file is overwritten each time Cypress starts.
  • 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
    • numElements - 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 command
    • spec - the filename of the spec that included the runnable

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

- 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

@cypress
Copy link

cypress bot commented Nov 12, 2025

cypress    Run #67543

Run Properties:  status check passed Passed #67543  •  git commit 40c2e5f3ad: Merge branch 'develop' into csv-benchmark
Project cypress
Branch Review csv-benchmark
Run status status check passed Passed #67543
Run duration 18m 41s
Commit git commit 40c2e5f3ad: Merge branch 'develop' into csv-benchmark
Committer Cacie Prins
View all properties for this run ↗︎

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

Warning

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

UI Coverage  45.61%
  Untested elements 187  
  Tested elements 161  
Accessibility  98%
  Failed rules  4 critical   8 serious   2 moderate   2 minor
  Failed elements 101  

@cacieprins cacieprins marked this pull request as draft November 13, 2025 16:38
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.

3 participants