Browse Source

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>
v6
Andreas Madsen 8 years ago
committed by James M Snell
parent
commit
138a7922ce
  1. 6
      benchmark/compare.R

6
benchmark/compare.R

@ -16,8 +16,12 @@ if (!is.null(args.options$help) ||
plot.filename = args.options$plot; 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 = data.frame(dat);
dat$nameTwoLines = paste0(dat$filename, '\n', dat$configuration); dat$nameTwoLines = paste0(dat$filename, '\n', dat$configuration);
dat$name = paste0(dat$filename, dat$configuration); dat$name = paste0(dat$filename, dat$configuration);

Loading…
Cancel
Save