tile38/pkg/controller/json_test.go

21 lines
302 B
Go
Raw Normal View History

2016-03-05 02:08:16 +03:00
package controller
import (
"encoding/json"
"testing"
)
func BenchmarkJSONString(t *testing.B) {
var s = "the need for mead"
for i := 0; i < t.N; i++ {
jsonString(s)
}
}
func BenchmarkJSONMarshal(t *testing.B) {
var s = "the need for mead"
for i := 0; i < t.N; i++ {
json.Marshal(s)
}
}