Skip to content

Instantly share code, notes, and snippets.

@AndreasMadsen
Last active October 6, 2016 13:09
Show Gist options
  • Save AndreasMadsen/9f9739514116488c27c06ebaff813af1 to your computer and use it in GitHub Desktop.
Save AndreasMadsen/9f9739514116488c27c06ebaff813af1 to your computer and use it in GitHub Desktop.
#!/usr/bin/env Rscript
library(stringr);
library(plyr);
dat = read.csv(file('stdin'), strip.white=TRUE);
dat = data.frame(dat);
dat$group = str_extract(dat$filename, "^[^/]+");
byfile = ddply(dat, c('filename'), function(subdat) {
return(data.frame(
time=sum(subdat$time)
));
});
options(scipen=999);
write.csv(byfile, row.names=F);
bygroup = ddply(dat, c('group'), function(subdat) {
return(data.frame(
time=sum(subdat$time)
));
});
options(scipen=999);
write.csv(bygroup, row.names=F);
filename time
arrays/var-int.js 2.829228928
arrays/zero-float.js 2.701622684
arrays/zero-int.js 2.401909094
assert/deepequal-prims-and-objs-big-array.js 29.453457599
assert/deepequal-prims-and-objs-big-loop.js 11.605701092
assert/deepequal-typedarrays.js 4.258226304
buffers/buffer_zero.js 0.731430823
buffers/buffer-base64-decode.js 1.637802571
buffers/buffer-base64-encode.js 2.905214915
buffers/buffer-bytelength.js 35.03896573
buffers/buffer-compare-instance-method.js 1.847055407
buffers/buffer-compare-offset.js 4.279419022
buffers/buffer-compare.js 1.239649737
buffers/buffer-creation.js 68.826471052
buffers/buffer-indexof.js 471.329631652
buffers/buffer-iterate.js 2.52353428
buffers/buffer-read.js 0.978701734
buffers/buffer-slice.js 0.72225285
buffers/buffer-swap.js 47.287909382
buffers/buffer-tostring.js 9.286787387
buffers/buffer-write.js 1.106499058
buffers/dataview-set.js 0.558107219
child_process/child-process-exec-stdout.js 25.066066692
child_process/child-process-read.js 25.02359371
child_process/spawn-echo.js 3.478396069
crypto/aes-gcm-throughput.js 3.798784845
crypto/cipher-stream.js 24.273127333
crypto/hash-stream-creation.js 51.387671353
crypto/hash-stream-throughput.js 21.63393253
crypto/rsa-encrypt-decrypt-throughput.js 17.048872372
crypto/rsa-sign-verify-throughput.js 32.198419581
dgram/array-vs-concat.js 160.087608365
dgram/multi-buffer.js 120.047952174
dgram/offset-length.js 40.018850772
dgram/single-buffer.js 40.016175418
domain/domain-fn-args.js 0.002518293
es/defaultparams-bench.js 1.239386946
es/destructuring-bench.js 15.42383435
es/restparams-bench.js 14.42176263
events/ee-add-remove.js 0.216753322
events/ee-emit-multi-args.js 0.316464984
events/ee-emit.js 0.218067887
events/ee-listener-count-on-prototype.js 0.099553833
events/ee-listeners-many.js 1.386678203
events/ee-listeners.js 0.235979163
fs/bench-readdir.js 0.870465689
fs/bench-readdirSync.js 0.377622521
fs/read-stream-throughput.js 86.900246143
fs/readfile.js 20.003152863
fs/write-stream-throughput.js 61.071011295
http/_chunky_http_client.js 44.647675922
http/bench-parser.js 1.986768545
http/check_is_http_token.js 1.077963594
http/chunked.js 120.537014012
http/client-request-body.js 89.989941936
http/cluster.js 120.885106883
http/end-vs-write-end.js 242.513959801
http/simple.js 364.002774251
misc/console.js 12.685119108
misc/freelist.js 0.604533906
misc/function_call/index.js 0.821358027
misc/set-immediate-breadth-args.js 4.403189275
misc/set-immediate-breadth.js 3.103553348
misc/set-immediate-depth-args.js 18.281362854
misc/set-immediate-depth.js 13.43667669
misc/startup.js 1.008718036
misc/v8.js 20.140807487
module/module-loader.js 61.096520274
net/net-c2s-cork.js 40.046262324
net/net-c2s.js 30.059296379
net/net-pipe.js 30.127408546
net/net-s2c.js 30.064624534
net/tcp-raw-c2s.js 30.009219458
net/tcp-raw-pipe.js 30.027237863
net/tcp-raw-s2c.js 30.027202442
path/basename-posix.js 0.662490565
path/basename-win32.js 1.041808479
path/dirname-posix.js 0.231344986
path/dirname-win32.js 0.538805325
path/extname-posix.js 0.724794444
path/extname-win32.js 0.832569185
path/format-posix.js 0.816651518
path/format-win32.js 1.654330918
path/isAbsolute-posix.js 0.088509126
path/isAbsolute-win32.js 0.250449992
path/join-posix.js 1.828579239
path/join-win32.js 2.054894727
path/makeLong-win32.js 6.797941399
path/normalize-posix.js 1.183460276
path/normalize-win32.js 1.749546032
path/parse-posix.js 0.981101448
path/parse-win32.js 1.537555956
path/relative-posix.js 4.530659994
path/relative-win32.js 4.911575845
path/resolve-posix.js 19.381315142
path/resolve-win32.js 13.753648861
process/bench-env.js 0.525489416
process/bench-hrtime.js 0.082499623
process/next-tick-breadth-args.js 1.540433053
process/next-tick-breadth.js 1.036504101
process/next-tick-depth-args.js 0.200179511
process/next-tick-depth.js 0.121263247
querystring/querystring-parse.js 20.795150056
querystring/querystring-stringify.js 21.189271562
string_decoder/string-decoder-create.js 68.119168904
string_decoder/string-decoder.js 3078.665514587
timers/timers.js 675.593106827
tls/throughput.js 44.711595782
tls/tls-connect.js 10.002807422
url/url-parse.js 6.020289241
url/url-resolve.js 30.150350031
util/format.js 2.318097912
util/inspect-proxy.js 117.425272483
util/inspect.js 72.38652154
group time
arrays 7.932760706
assert 45.317384995
buffers 650.299432819
child_process 53.568056471
crypto 150.340808014
dgram 360.170586729
domain 0.002518293
es 31.084983926
events 2.473497392
fs 169.222498511
http 985.641204944
misc 74.485318731
module 61.096520274
net 220.361251546
path 65.552033457
process 3.506368951
querystring 41.984421618
string_decoder 3146.784683491
timers 675.593106827
tls 54.714403204
url 36.170639272
util 192.129891935
node benchmark/run.js --format csv -- \
arrays assert buffers child_process crypto dgram domain \
es events fs http misc module net path process querystring \
streams string_decoder timers tls url util \
| Rscript agg.R
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment