summary.benchmark: Summary method for the 'benchmark' timings.

Description Usage Arguments Value Author(s) See Also Examples

View source: R/summary.R

Description

This method computes aggregated statistics (quantiles, means and sums) for each expression.

Usage

1
2
## S3 method for class 'benchmark'
summary(object, relative = "median", ...)

Arguments

object

An object of class benchmark.

relative

Character. The name or index of the column whose values will be used to compute relative timings.

...

Not currently used.

Value

The method returns a data.frame with additional attributes, which contains these columns:

expr

The deparsed expression as passed to benchmark or the name of the argument if the expression was passed as a named argument.

n.eval

Number of successful measurements.

min

Minimal timing measurement for this expression.

lw.qu

First quartile of measurements for this expression.

mean

Sample mean of measurements for this expression.

median

Sample median of measurements for this expression.

up.qu

Third quartile of measurements for this expression.

max

Maximal timing measurement for this expression.

total

Total (summed) measured time for this expression.

relative

Relative difference across expressions compared to a minimal value in the column, specified by the argument relative.

Additional attributes:

units

Units for time intervals.

Author(s)

Artem Klevtsov a.a.klevtsov@gmail.com

See Also

mean.benchmark()

Examples

1
2
3
4
5
6
timings <- benchmark(
  rchisq(100, 0), rchisq(100, 1), rchisq(100, 2),
  rchisq(100, 3), rchisq(100, 5),
  times = 1000L
)
summary(timings)

benchr documentation built on March 13, 2020, 3:29 a.m.