Permalink
Browse files

report sorted example times

git-svn-id: https://svn.r-project.org/R/trunk@60912 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information...
1 parent d1b8bbd commit 3d533e34a567344d11212f7b3f314b9a66272b8a ripley committed Oct 10, 2012
Showing with 12 additions and 0 deletions.
  1. +12 −0 src/library/tools/R/check.R
@@ -1927,6 +1927,18 @@ setRlibs <- function(lib0 = "", pkgdir = ".", suggests = FALSE,
printLog0(Log, paste(c("", out, ""), collapse = "\n"))
resultLog(Log, "OK")
}
+ if (do_timings) {
+ tfile <- paste0(pkgname, "-Ex.timings")
+ times <- read.table(tfile, header = TRUE, row.names = 1)
+ o <- order(times[[1]]+times[[2]], decreasing = TRUE)
+ times <- times[o, ]
+ keep <- (times[[1]] + times[[2]] > 5) | (times[[3]] > 5)
+ if(any(keep)) {
+ printLog(Log, "Examples with CPU or elapsed time > 5s\n")
+ times <- capture.output(format(times[keep, ]))
+ printLog(Log, paste(times, collapse="\n"))
+ }
+ }
TRUE
}

0 comments on commit 3d533e3

Please sign in to comment.