kdlucas / byte-unixbench

Automatically exported from code.google.com/p/byte-unixbench
GNU General Public License v2.0
1.27k stars 323 forks source link

Added csv support(score only) by Environment variable. #52

Closed t2-kob closed 6 years ago

t2-kob commented 6 years ago

I deleted Branch by mistake, so I will make a pull request again. Sorry!


UnixBench outputs benchmark score as console, file, and HTML.

With such an output method, it is difficult to process when comparing the results obtained in multiple environments. Therefore, I made it possible to output the result to CSV.

And this change does not affect the benchmark score.


UnixBench was trying support to change directories via Environment variables, I think. So I decide to use Environment variable "UB_OUTPUT_CSV".

This option will output csv file to "results" directory. If benchmark result is named Banana-2018-01-12-01, then csv file name is Banana-2018-01-12-01.csv.

usage:

export UB_OUTPUT_CSV=true
./Run -c 1 -c 2 -c 3 int double

output example:

Concurrency,Arithmetic Test (double),Arithmetic Test (int)
1,504156875.4,493839802.2
2,492484439.5,495202784.3
3,517763703.2,520804801.4
kdlucas commented 6 years ago

Looks good, and I like the simplicity of it.