Skip to content

Make RecordDiagnostics::time_span take CommandEncoder#21504

Open
akimakinai wants to merge 3 commits intobevyengine:mainfrom
akimakinai:pass_span_encoder
Open

Make RecordDiagnostics::time_span take CommandEncoder#21504
akimakinai wants to merge 3 commits intobevyengine:mainfrom
akimakinai:pass_span_encoder

Conversation

@akimakinai
Copy link
Contributor

Objective

Solution

  • Make RecordDiagnostics::time_span take CommandEncoder instead of being generic over command encoder or pass

Testing

  • cargo check passes

@alice-i-cecile alice-i-cecile added A-Rendering Drawing game state to the screen C-Code-Quality A section of code that is hard to understand or change A-Diagnostics Logging, crash handling, error reporting and performance analysis D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Oct 13, 2025
///
/// Returns a guard, which will panic on drop unless you end the span.
fn time_span<E, N>(&self, encoder: &mut E, name: N) -> TimeSpanGuard<'_, Self, E>
fn time_span<E, N>(&self, encoder: &mut CommandEncoder, name: N) -> TimeSpanGuard<'_, Self, E>
Copy link
Contributor

@kristoff3r kristoff3r Oct 16, 2025

Choose a reason for hiding this comment

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

I don't fully understand the context of this change, but I checked and the E is entirely unused after this, so it and the PhantomData should be removed from TimeSpanGuard.

@alice-i-cecile alice-i-cecile added S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Oct 16, 2025
@cart cart added this to Rendering Feb 12, 2026
@github-project-automation github-project-automation bot moved this to Needs SME Triage in Rendering Feb 12, 2026
@cart cart removed this from Rendering Feb 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Diagnostics Logging, crash handling, error reporting and performance analysis A-Rendering Drawing game state to the screen C-Code-Quality A section of code that is hard to understand or change D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged

Projects

No open projects
Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants