github.com/influxdata/telegraf@v1.30.3/internal/templating/template_test.go (about)

     1  package templating
     2  
     3  import "testing"
     4  
     5  func BenchmarkTemplateLess(b *testing.B) {
     6  	a := templateSpec{
     7  		template:  "aa|bb|cc|dd|ee|ff",
     8  		separator: "|",
     9  	}
    10  	specs := templateSpecs{a, a}
    11  	for i := 0; i < b.N; i++ {
    12  		specs.Less(0, 1)
    13  	}
    14  }