seasonder_splitLog {SeaSondeR} | R Documentation |
Split Logs Based on Time Thresholds
Description
The function splits the log entries into blocks based on time gaps between timestamps. The threshold for splitting can be provided or calculated based on the gaps in the log timestamps.
Usage
seasonder_splitLog(
threshold = NULL,
threshold_factor = 4,
threshold_quantile = 0.9,
min_threshold_secs = 10
)
Arguments
threshold |
The time difference threshold for splitting the logs. If NULL, it's calculated. |
threshold_factor |
Multiplicative factor applied to the calculated threshold. |
threshold_quantile |
Quantile used for threshold calculation if |
min_threshold_secs |
Minimum threshold in seconds. |
Value
A list of log blocks, each block being a vector of log entries.
Examples
# Enable logging
seasonder_enableLogs()
# Log some messages
seasonder_log("First log entry", "info")
Sys.sleep(0.1)
seasonder_log("Second log entry", "info")
# Split logs into blocks (using a 1-second threshold)
blocks <- seasonder_splitLog(threshold = as.difftime(300, units = "secs"))
str(blocks)
[Package SeaSondeR version 0.2.8 Index]