powered by
benchmark
This method computes aggregated statistics (sample mean and confidence intervals) for each expression.
# S3 method for benchmark mean(x, trim = 0.05, conf.level = 0.95, relative = "mean", ...)
An object of class benchmark.
Numeric. The fraction (0 to 0.5) of observations to be trimmed before the mean is computed.
Numeric. Confidence level of the interval.
Character. The name or index of the column whose values will be used to compute relative timings.
Not currently used.
The method returns a data.frame with additional attributes, which contains these columns:
data.frame
The deparsed expression as passed to benchmark or the name of the argument if the expression was passed as a named argument.
Sample mean for timing results.
Trimmed sample mean for timing results (a fraction of observations to be trimmed is defined by the argument trim).
trim
Lower boundary for the confidence level (confidence level is specified by the argument conf.level).
conf.level
Upper boundary for the confidence level (confidence level is specified by the argument conf.level).
Relative difference across expressions compared to a minimal value in the column, specified by the argument relative.
relative
Additional attributes:
Units for time intervals.
Confidence level.
Fraction of observations that was trimmed before the trimmed mean was computed.
summary.benchmark()
# NOT RUN { timings <- benchmark( rchisq(100, 0), rchisq(100, 1), rchisq(100, 2), rchisq(100, 3), rchisq(100, 5), times = 1000L ) mean(timings) # }
Run the code above in your browser using DataLab