dagger-runtime-benchmark/actions/bench.go

28 lines
443 B
Go
Raw Permalink Normal View History

2023-05-18 15:07:24 +02:00
package main
import (
"context"
"log"
"os"
"os/exec"
)
func Bench(ctx context.Context) error {
output, err := exec.Command("cargo", "build").CombinedOutput()
log.Println(string(output))
if err != nil {
return err
}
cmd := exec.Command("dagger", "run", "target/debug/dagger-runtime-benchmark")
cmd.Stdin = os.Stdin
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
if err = cmd.Run(); err != nil {
return err
}
return nil
}