From a5046bf8efd6c1f1280e74974f9bb9e1f7081171 Mon Sep 17 00:00:00 2001 From: Andreas Madsen Date: Wed, 12 Oct 2016 20:23:40 +0200 Subject: [PATCH] benchmark: fixes csv parsing given no parameters When a benchmark did not contain any parameters the csv configuration filed would be "". In R this is by default parsed as NA, causing NA in the printout too. Fixes: https://github.com/nodejs/node/issues/9061 PR-URL: https://github.com/nodejs/node/pull/9064 Reviewed-By: James M Snell Reviewed-By: Brian White --- benchmark/compare.R | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/benchmark/compare.R b/benchmark/compare.R index 1200340f329837..b4316ca7f81600 100644 --- a/benchmark/compare.R +++ b/benchmark/compare.R @@ -16,8 +16,12 @@ if (!is.null(args.options$help) || plot.filename = args.options$plot; -dat = read.csv(file('stdin')); +dat = read.csv( + file('stdin'), + colClasses=c('character', 'character', 'character', 'numeric', 'numeric') +); dat = data.frame(dat); + dat$nameTwoLines = paste0(dat$filename, '\n', dat$configuration); dat$name = paste0(dat$filename, dat$configuration);