timing_data | R Documentation |
Timing can be enabled via the chunk option time = TRUE
(e.g., set
reactor(time = TRUE)
in the first code chunk). After it is
enabled, the execution time for code chunks and text blocks will be recorded.
This function can be called to retrieve the timing data later in the document
(e.g., in the last code chunk).
timing_data(threshold = 0, sort = TRUE, total = TRUE)
threshold |
A number (time in seconds) to subset data with. Only rows with time above this threshold are returned. |
sort |
Whether to sort the data by time in the decreasing order. |
total |
Whether to append the total time to the data. |
A data frame containing input file paths, line numbers, chunk labels,
and time. If no timing data is available, NULL
is returned.
By default, the data will be cleared after each call of fuse()
and
will not be available outside fuse()
. To store the data persistently, you
can set the time
option to a file path. This is necessary if you want to
get the timing data for multiple input documents (such as all chapters of a
book). Each document needs to point the time
option to the same path.
When you do not need timing any more, you will need to delete this file by
yourself.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.