mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-11-09 00:20:25 +08:00
改进变量分析测试用例
This commit is contained in:
@@ -55,11 +55,13 @@ func BenchmarkParseVariables(b *testing.B) {
|
|||||||
|
|
||||||
b.ResetTimer()
|
b.ResetTimer()
|
||||||
|
|
||||||
for i := 0; i < b.N; i++ {
|
b.RunParallel(func(pb *testing.PB) {
|
||||||
_ = ParseVariables("hello, ${name}, ${age}, ${gender}, ${home}, world", func(s string) string {
|
for pb.Next() {
|
||||||
return "Lu"
|
_ = ParseVariables("hello, ${name}, ${age}, ${gender}, ${home}, world", func(s string) string {
|
||||||
})
|
return "Lu"
|
||||||
}
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func BenchmarkParseVariablesFromHolders(b *testing.B) {
|
func BenchmarkParseVariablesFromHolders(b *testing.B) {
|
||||||
|
|||||||
Reference in New Issue
Block a user