Skip to content

Commit a5046bf

Browse files
AndreasMadsenjasnell
authored andcommitted
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: #9061 PR-URL: #9064 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Brian White <[email protected]>
1 parent 0022bfe commit a5046bf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

benchmark/compare.R

+5-1
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,12 @@ if (!is.null(args.options$help) ||
1616

1717
plot.filename = args.options$plot;
1818

19-
dat = read.csv(file('stdin'));
19+
dat = read.csv(
20+
file('stdin'),
21+
colClasses=c('character', 'character', 'character', 'numeric', 'numeric')
22+
);
2023
dat = data.frame(dat);
24+
2125
dat$nameTwoLines = paste0(dat$filename, '\n', dat$configuration);
2226
dat$name = paste0(dat$filename, dat$configuration);
2327

0 commit comments

Comments
 (0)