增加 MaxCarbon、MinCarbon 方法性能测试

This commit is contained in:
gouguoyin 2024-11-29 11:47:59 +08:00
parent 79d9928ccf
commit 1c0781df0c

View File

@ -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()
}
}