Skip to content

Commit 2ef973d

Browse files
committed
Removing unnecessary GOMAXPROCS in benchmarks
1 parent 6d064af commit 2ef973d

8 files changed

+0
-38
lines changed

jsonp_test.go

-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package mango
33
import (
44
"net/http"
55
"testing"
6-
"runtime"
76
)
87

98
func jsonServer(env Env) (Status, Headers, Body) {
@@ -14,10 +13,6 @@ func nonJsonServer(env Env) (Status, Headers, Body) {
1413
return 200, Headers{"Content-Type": []string{"text/html"}}, Body("<h1>Hello World!</h1>")
1514
}
1615

17-
func init() {
18-
runtime.GOMAXPROCS(4)
19-
}
20-
2116
func TestJSONPSuccess(t *testing.T) {
2217
// Compile the stack
2318
jsonpStack := new(Stack)

logger_test.go

-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"net/http"
66
"log"
77
"testing"
8-
"runtime"
98
)
109

1110
var loggerBuffer = &bytes.Buffer{}
@@ -15,10 +14,6 @@ func loggerTestServer(env Env) (Status, Headers, Body) {
1514
return 200, Headers{}, Body("Hello World!")
1615
}
1716

18-
func init() {
19-
runtime.GOMAXPROCS(4)
20-
}
21-
2217
func TestLogger(t *testing.T) {
2318
// Compile the stack
2419
loggerStack := new(Stack)

mango_test.go

-3
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,13 @@ import (
66
"testing"
77
"fmt"
88
"net/http"
9-
"runtime"
109
)
1110

1211
func helloWorld(env Env) (Status, Headers, Body) {
1312
return 200, Headers{}, Body("Hello World!")
1413
}
1514

1615
func init() {
17-
runtime.GOMAXPROCS(4)
18-
1916
fmt.Println("Testing Mango Version:", VersionString())
2017
}
2118

redirect_test.go

-5
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,12 @@ package mango
33
import (
44
"net/http"
55
"testing"
6-
"runtime"
76
)
87

98
func redirectTestServer(env Env) (Status, Headers, Body) {
109
return Redirect(302, "/somewhere")
1110
}
1211

13-
func init() {
14-
runtime.GOMAXPROCS(4)
15-
}
16-
1712
func TestRedirect(t *testing.T) {
1813
// Compile the stack
1914
redirectApp := new(Stack).Compile(redirectTestServer)

routing_test.go

-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package mango
33
import (
44
"net/http"
55
"testing"
6-
"runtime"
76
)
87

98
func routingTestServer(env Env) (Status, Headers, Body) {
@@ -18,10 +17,6 @@ func routingBTestServer(env Env) (Status, Headers, Body) {
1817
return 200, Headers{}, Body("Server B")
1918
}
2019

21-
func init() {
22-
runtime.GOMAXPROCS(4)
23-
}
24-
2520
func TestRoutingSuccess(t *testing.T) {
2621
// Compile the stack
2722
routingStack := new(Stack)

sessions_test.go

-5
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,10 @@ package mango
22

33
import (
44
"net/http"
5-
"runtime"
65
"strings"
76
"testing"
87
)
98

10-
func init() {
11-
runtime.GOMAXPROCS(4)
12-
}
13-
149
func TestSessionEncodingDecoding(t *testing.T) {
1510
cookie := map[string]interface{}{"value": "foo"}
1611
secret := "secret"

show_errors_test.go

-5
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,13 @@ package mango
33
import (
44
"net/http"
55
"testing"
6-
"runtime"
76
)
87

98
func showErrorsTestServer(env Env) (Status, Headers, Body) {
109
panic("foo!")
1110
return 200, Headers{}, Body("Hello World!")
1211
}
1312

14-
func init() {
15-
runtime.GOMAXPROCS(4)
16-
}
17-
1813
func TestShowErrors(t *testing.T) {
1914
// Compile the stack
2015
showErrorsStack := new(Stack)

static_test.go

-5
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,12 @@ import (
55
"net/http"
66
"io/ioutil"
77
"testing"
8-
"runtime"
98
)
109

1110
func staticTestServer(env Env) (Status, Headers, Body) {
1211
return 200, Headers{"Content-Type": []string{"text/html"}}, Body("<h1>Hello World!</h1>")
1312
}
1413

15-
func init() {
16-
runtime.GOMAXPROCS(4)
17-
}
18-
1914
func TestStaticSuccess(t *testing.T) {
2015
// Compile the stack
2116
staticStack := new(Stack)

0 commit comments

Comments
 (0)