Skip to content

Instantly share code, notes, and snippets.

@crides
Created August 1, 2018 10:15
Show Gist options
  • Save crides/bbdd110aec9a0237bc31693544cd35a6 to your computer and use it in GitHub Desktop.
Save crides/bbdd110aec9a0237bc31693544cd35a6 to your computer and use it in GitHub Desktop.
BEGIN {
RS = ""; FS="\n";
"ls ./*.exe" | getline ls
split(ls, test_exes, "\\s");
#print length(test_exes)
RS = "\n"; FS=" ";
for (i = 1; i <= length(test_exes); i ++) {
#print test_exes[i], i
a[i] = 0;
}
i = 1
while (i <= 20) {
#print i;
for (j = 1; j <= length(test_exes); j ++) {
cmd = test_exes[j] " ./test.wren"
cmd | getline time
a[j] += time
#print test_exes[j] " ./test.wren : " time
close(cmd)
}
i += 1
}
for (i = 1; i <= length(test_exes); i ++) {
print test_exes[i]" : " (a[i] / 20) " (total: " a[i] ")"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment