mirror of
https://gitee.com/dromara/carbon.git
synced 2024-11-29 18:57:37 +08:00
18 lines
274 B
Go
Executable File
18 lines
274 B
Go
Executable File
package carbon
|
|
|
|
import "testing"
|
|
|
|
func BenchmarkCarbon_MarshalJSON(b *testing.B) {
|
|
now := Now()
|
|
for n := 0; n < b.N; n++ {
|
|
now.MarshalJSON()
|
|
}
|
|
}
|
|
|
|
func BenchmarkCarbon_UnmarshalJSON(b *testing.B) {
|
|
now := Now()
|
|
for n := 0; n < b.N; n++ {
|
|
now.UnmarshalJSON(nil)
|
|
}
|
|
}
|