mirror of
https://gitee.com/dromara/carbon.git
synced 2024-11-29 18:57:37 +08:00
增加 MaxCarbon、MinCarbon 方法性能测试
This commit is contained in:
parent
79d9928ccf
commit
1c0781df0c
@ -47,3 +47,15 @@ func BenchmarkCarbon_Min(b *testing.B) {
|
||||
Min(now.SubDay(), now.AddDay())
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkCarbon_MaxCarbon(b *testing.B) {
|
||||
for n := 0; n < b.N; n++ {
|
||||
MaxCarbon()
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkCarbon_MinCarbon(b *testing.B) {
|
||||
for n := 0; n < b.N; n++ {
|
||||
MinCarbon()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user