carbon/database_bench_test.go
2023-12-28 11:27:27 +08:00

25 lines
367 B
Go
Executable File

package carbon
import "testing"
func BenchmarkCarbon_Scan(b *testing.B) {
now := Now()
for n := 0; n < b.N; n++ {
_ = now.Scan(nil)
}
}
func BenchmarkCarbon_Value(b *testing.B) {
now := Now()
for n := 0; n < b.N; n++ {
now.Value()
}
}
func BenchmarkCarbon_GormDataType(b *testing.B) {
now := Now()
for n := 0; n < b.N; n++ {
now.GormDataType()
}
}