aboutsummaryrefslogtreecommitdiffhomepage
path: root/admin_test.go
blob: fe2932cb8ca04a62110fa061ee62828fd9990746 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package caddy2

import (
	"strings"
	"testing"
)

func BenchmarkLoad(b *testing.B) {
	for i := 0; i < b.N; i++ {
		r := strings.NewReader(`{
			"testval": "Yippee!",
			"modules": {
				"http": {
					"servers": {
						"myserver": {
							"listen": ["tcp/localhost:8080-8084"],
							"read_timeout": "30s"
						},
						"yourserver": {
							"listen": ["127.0.0.1:5000"],
							"read_header_timeout": "15s"
						}
					}
				}
			}
		}
		`)
		Load(r)
	}
}