bench_time | R Documentation |
Measure Process CPU and real time that an expression used.
bench_time(expr)
expr |
A expression to be timed. |
On some systems (such as macOS) the process clock has lower precision than the realtime clock, as a result there may be cases where the process time is larger than the real time for fast expressions.
A bench_time
object with two values.
process
- The process CPU usage of the expression evaluation.
real
- The wallclock time of the expression evaluation.
bench_memory()
To measure memory allocations for a given expression.
# This will use ~.5 seconds of real time, but very little process time.
bench_time(Sys.sleep(.5))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.