Files
porto/pkg/tasks/task_bench_test.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()
}
}