Skip to content

Instantly share code, notes, and snippets.

@sayden
Created August 17, 2018 21:06
Show Gist options
  • Save sayden/f9b119f3418d4f8b5d59ef05a545ed7d to your computer and use it in GitHub Desktop.
Save sayden/f9b119f3418d4f8b5d59ef05a545ed7d to your computer and use it in GitHub Desktop.
time after test
package time_profile
import "testing"
func Benchmark_TimeAfter(b *testing.B) {
ch := timeAfter()
for n := 0; n < b.N; n++ {
ch <- struct{}{}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment