benchmark: add output format option [csv]
authorBrendan Ashworth <brendan.ashworth@me.com>
Tue, 10 Feb 2015 03:36:52 +0000 (19:36 -0800)
committerBrendan Ashworth <brendan.ashworth@me.com>
Tue, 17 Mar 2015 04:27:17 +0000 (21:27 -0700)
commitc638dad56775c9593d1d79b7f9f79c49bbcd9628
tree30da7c5bd33b328a9349aabc4b9d73221fcce1b1
parent97d8d4928d8126745d7734d635679ccf3c2dd431
benchmark: add output format option [csv]

This commit adds an `OUTPUT_FORMAT` environment variable option for
all benchmark tests that allow either 'csv' or 'default' output. Default
output has been left unchanged, and csv output prints out the csv
headers along with the csv formatted per-test output, each test also
seperated by a newline.

It can be used like the following:
$ OUTPUT_FORMAT=csv iojs benchmark/common.js http

Not specifying the OUTPUT_FORMAT env var will default to 'default'.
Specifying a bad value will throw an error.

PR-URL: https://github.com/iojs/io.js/pull/777
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
benchmark/common.js