Skip to content

Instantly share code, notes, and snippets.

@mdempsky
Created October 25, 2016 15:11
Show Gist options
  • Save mdempsky/bc3dc8bebce0a545c1d515afc3f45014 to your computer and use it in GitHub Desktop.
Save mdempsky/bc3dc8bebce0a545c1d515afc3f45014 to your computer and use it in GitHub Desktop.
package main
import (
"flag"
"os/exec"
"strings"
)
func main() {
flag.Parse()
if !strings.HasSuffix(flag.Arg(0), "/compile") {
exec.Command(flag.Arg(0), flag.Args()[1:]...).Run()
return
}
argss := [2][]string{
append([]string{"-newparser=0", "-bench=/tmp/toolbench-0.txt"}, flag.Args()[1:]...),
append([]string{"-newparser=1", "-bench=/tmp/toolbench-1.txt"}, flag.Args()[1:]...),
}
for i := 0; i < 30; i++ {
for _, args := range argss {
exec.Command(flag.Arg(0), args...).Run()
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment