summaryrefslogtreecommitdiffhomepage
path: root/test/benchmarks/network/ruby_test.go
diff options
context:
space:
mode:
authorZach Koopmans <zkoopmans@google.com>2020-12-09 13:49:41 -0800
committerShentubot <shentubot@google.com>2020-12-09 15:57:58 -0800
commitb4af9d4572707718514e66b7e537bc51216b60f6 (patch)
tree0e8beb192c23471501a71bb24aab39f67e2e33c1 /test/benchmarks/network/ruby_test.go
parentaaf4901c8cb35229679c3f7c58a867fe4e6e7252 (diff)
Add network benchmarks jobs
Add httpd, nginx, node, and ruby benchmarks to continuous jobs. PiperOrigin-RevId: 346629115
Diffstat (limited to 'test/benchmarks/network/ruby_test.go')
-rw-r--r--test/benchmarks/network/ruby_test.go9
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())
+}