Skip to content

Commit

Permalink
benchmark: fixes csv parsing given no parameters
Browse files Browse the repository at this point in the history
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: #9061
PR-URL: #9064
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
  • Loading branch information
AndreasMadsen authored and jasnell committed Oct 17, 2016
1 parent 0022bfe commit a5046bf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion benchmark/compare.R
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit a5046bf

Please sign in to comment.