diff options
Diffstat (limited to 'test/benchmarks/network/ruby_test.go')
-rw-r--r-- | test/benchmarks/network/ruby_test.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/benchmarks/network/ruby_test.go b/test/benchmarks/network/ruby_test.go index 0174ff3f3..6f5199480 100644 --- a/test/benchmarks/network/ruby_test.go +++ b/test/benchmarks/network/ruby_test.go @@ -16,6 +16,7 @@ package network import ( "context" "fmt" + "os" "strconv" "testing" "time" @@ -25,6 +26,8 @@ import ( "gvisor.dev/gvisor/test/benchmarks/tools" ) +var h harness.Harness + // BenchmarkRuby runs requests using 'hey' against a ruby application server. // On start, ruby app generates some random data and pushes it to a redis // instance. On a request, the app grabs for random entries from the redis @@ -52,7 +55,6 @@ func BenchmarkRuby(b *testing.B) { // runRuby runs the test for a given # of requests and concurrency. func runRuby(b *testing.B, hey *tools.Hey) { - b.Helper() // The machine to hold Redis and the Ruby Server. serverMachine, err := h.GetMachine() if err != nil { @@ -141,3 +143,8 @@ func runRuby(b *testing.B, hey *tools.Hey) { hey.Report(b, out) b.StartTimer() } + +func TestMain(m *testing.M) { + h.Init() + os.Exit(m.Run()) +} |