Refactor templateSpec less method (#5840)

This commit is contained in:
Charlie Vieth
2019-05-15 19:35:07 -04:00
committed by Daniel Nelson
parent 1b3ca655c6
commit 43c6d13c33
2 changed files with 20 additions and 11 deletions

View File

@@ -0,0 +1,14 @@
package templating
import "testing"
func BenchmarkTemplateLess(b *testing.B) {
a := templateSpec{
template: "aa|bb|cc|dd|ee|ff",
separator: "|",
}
specs := templateSpecs{a, a}
for i := 0; i < b.N; i++ {
specs.Less(0, 1)
}
}