Conversation
Fixes #3 with a common timestamp denoting the start of the pipe operation.
There was a problem hiding this comment.
Pull Request Overview
This PR adds a common timestamp to all steps within the same pipeline in the log file. The key enhancement is that all time_pipe() calls within the same pipeline now share a common start timestamp, making it easier to correlate timing data across pipeline steps.
- Added pipeline-level timestamp tracking to ensure consistent timing baselines
- Enhanced
get_log()andrm_log()functions to support retrieving/removing all logs at once - Added comprehensive vignettes demonstrating usage patterns and comparisons
Reviewed Changes
Copilot reviewed 15 out of 23 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| R/time_pipe.R | Core logic updated to track pipeline start times and maintain consistent timestamps |
| R/get_log.R | Enhanced to support retrieving all logs when log = NULL |
| R/rm_log.R | Enhanced to support removing all logs with force = TRUE parameter |
| R/emit_time.R | Updated function signature to accept pre-calculated duration and start time |
| R/zzz.R | Added start_times tracking list to the pipetime environment |
| vignettes/*.Rmd | Added new comprehensive vignette and updated existing one |
| man/*.Rd | Updated documentation to reflect new functionality |
| tests/testthat/test-time_pipe.R | Consolidated and improved test coverage |
| README.Rmd/.md | Updated examples and documentation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| result <- .data | ||
| end <- Sys.time() | ||
| end_time <- Sys.time() | ||
| duration <- as.numeric(difftime(end_time, start_time, units = unit)) |
There was a problem hiding this comment.
Missing unit validation. The function should validate that unit is one of the accepted values before passing it to difftime() to prevent runtime errors.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses issue #3 by adding a common timestamp to all steps within the same pipeline in the log file.
Adds a vignette illustrating usage.
Updates
get_log()andrm_log()to support retrieving or removing all logs.