summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Madsen <amwebdk@gmail.com>2016-10-12 20:23:40 +0200
committerJames M Snell <jasnell@gmail.com>2016-10-17 08:57:21 -0700
commit138a7922ce8bc92aa1c6e841a2e713b6371ffbc5 (patch)
tree73e20c0798573152906609476bb08273e371613b
parent3d294cf0c46595c328bf3a08961fb75e87497212 (diff)
downloadandroid-node-v8-138a7922ce8bc92aa1c6e841a2e713b6371ffbc5.tar.gz
android-node-v8-138a7922ce8bc92aa1c6e841a2e713b6371ffbc5.tar.bz2
android-node-v8-138a7922ce8bc92aa1c6e841a2e713b6371ffbc5.zip
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 <jasnell@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net>
-rw-r--r--benchmark/compare.R6
1 files changed, 5 insertions, 1 deletions
diff --git a/benchmark/compare.R b/benchmark/compare.R
index 1200340f32..b4316ca7f8 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);