Skip to content

Add test run durations to status updates #3368

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

Merged
merged 1 commit into from
Apr 7, 2025

Conversation

vinistock
Copy link
Member

@vinistock vinistock commented Mar 28, 2025

Motivation

The explorer supports reporting how long a test run took. We can simply set that to the time difference between when a test began executing and when we received a final update for it (pass, error or fail).

Implementation

The idea is to use a map of test_id => started_timestamp, so that we can retrieve when a test started and calculate the duration.

To avoid repeating the calculation multiple times, I created a tiny function inside the same scope to return the duration.

Automated Tests

Adjusted our existing tests to not try to assert the duration since that would make them flaky.

@vinistock vinistock added the vscode This pull request should be included in the VS Code extension's release notes label Mar 28, 2025 — with Graphite App
Copy link
Member Author


How to use the Graphite Merge Queue

Add the label graphite-merge to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@vinistock vinistock added the enhancement New feature or request label Mar 28, 2025 — with Graphite App
@vinistock vinistock self-assigned this Mar 28, 2025
@vinistock vinistock marked this pull request as ready for review March 28, 2025 18:35
@vinistock vinistock requested a review from a team as a code owner March 28, 2025 18:35
@vinistock vinistock force-pushed the 03-28-add_test_run_durations_to_status_updates branch from 5634b33 to 2b91654 Compare April 7, 2025 14:29
@vinistock vinistock merged commit a0f1531 into main Apr 7, 2025
43 checks passed
@vinistock vinistock deleted the 03-28-add_test_run_durations_to_status_updates branch April 7, 2025 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request vscode This pull request should be included in the VS Code extension's release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants