改进变量分析测试用例

This commit is contained in:
刘祥超
2022-11-16 14:27:20 +08:00
parent 0f7482511e
commit e5ba474419

View File

@@ -55,11 +55,13 @@ func BenchmarkParseVariables(b *testing.B) {
b.ResetTimer()
for i := 0; i < b.N; i++ {
_ = ParseVariables("hello, ${name}, ${age}, ${gender}, ${home}, world", func(s string) string {
return "Lu"
})
}
b.RunParallel(func(pb *testing.PB) {
for pb.Next() {
_ = ParseVariables("hello, ${name}, ${age}, ${gender}, ${home}, world", func(s string) string {
return "Lu"
})
}
})
}
func BenchmarkParseVariablesFromHolders(b *testing.B) {