bench_time

0th

Percentile

Human readable times

Construct, manipulate and display vectors of elapsed times in seconds. These are numeric vectors, so you can compare them numerically, but they can also be compared to human readable values such as '10ms'.

Usage
as_bench_time(x)

bench_time(x)

Arguments
x

A numeric or character vector. Character representations can use shorthand sizes (see examples).

Aliases
  • bench_time
  • as_bench_time
Examples
# NOT RUN {
bench_time("1")
bench_time("1ns")
bench_time("1us")
bench_time("1ms")
bench_time("1s")

bench_time("100ns") < "1ms"

sum(bench_time(c("1MB", "5MB", "500KB")))
# }
Documentation reproduced from package bench, version 1.0.1, License: GPL-3

Community examples

Looks like there are no examples yet.