mirror of https://github.com/tidwall/tile38.git
21 lines
298 B
Go
21 lines
298 B
Go
package server
|
|
|
|
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)
|
|
}
|
|
}
|