log_plot {autometric} | R Documentation |
Plot a metric of a process over time
Description
Visualize a metric of a log over time for a single process ID in a single log file.
Usage
log_plot(log, pid = NULL, name = NULL, phase = NULL, metric = "resident", ...)
Arguments
log |
Data frame returned by |
pid |
Either |
name |
Either |
phase |
Either |
metric |
Character string with the name of a metric to plot
against time. Must be only a single string.
Defaults to the resident set size (RSS), the total amount of memory
used by the process.
See |
... |
Named optional parameters to pass to the base
function |
Value
A base plot of a metric of a log over time.
Examples
path <- tempfile()
log_start(seconds = 0.25, path = path)
Sys.sleep(1)
log_stop()
Sys.sleep(2)
log <- log_read(path)
log_plot(log, metric = "cpu")
unlink(path)