mirror of
https://github.com/hanzoai/porto.git
synced 2026-11-03 18:08:27 +00:00
13 lines
207 B
Go
13 lines
207 B
Go
package tasks
|
|
|
|
import "testing"
|
|
|
|
func BenchmarkTaskRun(b *testing.B) {
|
|
task := NewTaskAtIntervals(0, Seconds).Do("benchmark", func() {})
|
|
b.ReportAllocs()
|
|
b.ResetTimer()
|
|
for range b.N {
|
|
task.Run()
|
|
}
|
|
}
|