Skip to content

Comments

Add common pipeline timestamp#4

Merged
CyGei merged 4 commits intomainfrom
pipe_id
Sep 29, 2025
Merged

Add common pipeline timestamp#4
CyGei merged 4 commits intomainfrom
pipe_id

Conversation

@CyGei
Copy link
Owner

@CyGei CyGei commented Sep 29, 2025

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() and rm_log() to support retrieving or removing all logs.

@CyGei CyGei requested a review from Copilot September 29, 2025 15:53
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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() and rm_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))
Copy link

Copilot AI Sep 29, 2025

Choose a reason for hiding this comment

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

Missing unit validation. The function should validate that unit is one of the accepted values before passing it to difftime() to prevent runtime errors.

Copilot uses AI. Check for mistakes.
@CyGei CyGei merged commit e463692 into main Sep 29, 2025
7 checks passed
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.

1 participant