2 Star 0 Fork 70

golang-package/carbon

forked from dromara/carbon 
Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
season_bench_test.go 911 Bytes
Copy Edit Raw Blame History
kuafuRace authored 2 months ago . test: Add b.ResetTimer()
package carbon
import (
"testing"
)
func BenchmarkCarbon_Season(b *testing.B) {
c := Now()
b.ResetTimer()
for n := 0; n < b.N; n++ {
c.Season()
}
}
func BenchmarkCarbon_StartOfSeason(b *testing.B) {
c := Now()
b.ResetTimer()
for n := 0; n < b.N; n++ {
c.StartOfSeason()
}
}
func BenchmarkCarbon_EndOfSeason(b *testing.B) {
c := Now()
b.ResetTimer()
for n := 0; n < b.N; n++ {
c.EndOfSeason()
}
}
func BenchmarkCarbon_IsSpring(b *testing.B) {
c := Now()
b.ResetTimer()
for n := 0; n < b.N; n++ {
c.IsSpring()
}
}
func BenchmarkCarbon_IsSummer(b *testing.B) {
c := Now()
b.ResetTimer()
for n := 0; n < b.N; n++ {
c.IsSummer()
}
}
func BenchmarkCarbon_IsAutumn(b *testing.B) {
c := Now()
b.ResetTimer()
for n := 0; n < b.N; n++ {
c.IsAutumn()
}
}
func BenchmarkCarbon_IsWinter(b *testing.B) {
c := Now()
b.ResetTimer()
for n := 0; n < b.N; n++ {
c.IsWinter()
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/golang-package/carbon.git
git@gitee.com:golang-package/carbon.git
golang-package
carbon
carbon
master

Search