Skip to content

Commit

Permalink
Add MaxCarbon、MinCarbon benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
gouguoyin committed Nov 29, 2024
1 parent e522ac7 commit 49c1266
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions extremum_bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}

0 comments on commit 49c1266

Please sign in to comment.