28 lines
443 B
Go
28 lines
443 B
Go
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
|
|
}
|