Skip to content

Conversation

@berkaysynnada
Copy link
Contributor

Which issue does this PR close?

  • Closes #.

Rationale for this change

Add methods to Time and ScopedTimerGuard that allow measuring elapsed time with custom start/end instants instead of relying on Instant::now().

What changes are included in this PR?

  • Add timer_with(now: Instant) to Time - creates a timer starting from a specific instant
  • Add stop_with(end_time: Instant) to ScopedTimerGuard - stops timer with a custom end time
  • Add done_with(end_time: Instant) to ScopedTimerGuard - stops timer with custom end time and consumes self
  • Add unit tests

Are these changes tested?

Yes, unit tests are added

Are there any user-facing changes?

@github-actions github-actions bot added the physical-plan Changes to the physical-plan crate label Jul 25, 2025
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

berkaysynnada and others added 3 commits July 26, 2025 15:21
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
@berkaysynnada berkaysynnada merged commit fd08e72 into apache:main Jul 27, 2025
27 checks passed
adriangb pushed a commit to pydantic/datafusion that referenced this pull request Jul 28, 2025
* Update value.rs

* Update value.rs

* Update value.rs

* Update datafusion/physical-plan/src/metrics/value.rs

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>

* Update datafusion/physical-plan/src/metrics/value.rs

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>

* Update datafusion/physical-plan/src/metrics/value.rs

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>

---------

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

physical-plan Changes to the physical-plan crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants