mirror of
https://github.com/lukaszraczylo/go-simple-graphql.git
synced 2026-10-12 00:45:31 +00:00
24 lines
380 B
Go
24 lines
380 B
Go
package gql
|
|
|
|
import "testing"
|
|
|
|
func Benchmark_compileQuery(bn *testing.B) {
|
|
b := NewConnection()
|
|
bn.ResetTimer()
|
|
for i := 0; i < bn.N; i++ {
|
|
b.compileQuery(
|
|
`query { viewer { login } }`,
|
|
)
|
|
}
|
|
}
|
|
|
|
func Benchmark_convertToJson(bn *testing.B) {
|
|
b := NewConnection()
|
|
bn.ResetTimer()
|
|
for i := 0; i < bn.N; i++ {
|
|
b.convertToJSON(
|
|
`query { viewer { login } }`,
|
|
)
|
|
}
|
|
}
|