Refactor templateSpec less method (#5840)
This commit is contained in:
committed by
Daniel Nelson
parent
1b3ca655c6
commit
43c6d13c33
14
internal/templating/template_test.go
Normal file
14
internal/templating/template_test.go
Normal 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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user