Skip to content

Instantly share code, notes, and snippets.

@nirasan
Created February 9, 2017 00:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nirasan/3d6ad5e08dbe950a112a892a54f303d0 to your computer and use it in GitHub Desktop.
Save nirasan/3d6ad5e08dbe950a112a892a54f303d0 to your computer and use it in GitHub Desktop.
package argumenter
import (
"testing"
)
func BenchmarkValidReflect(b *testing.B) {
for i := 0; i < b.N; i++ {
m := MyArg{}
e := ValidReflect(m)
if e != nil {
//no op
}
}
}
func BenchmarkValidGenerate(b *testing.B) {
for i := 0; i < b.N; i++ {
m := MyArg{}
e := ValidGenerate(&m)
if e != nil {
//no op
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment