mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-25 01:00:16 -05:00
config: set benchmark timer at right point
This commit is contained in:
@@ -7,8 +7,9 @@ import (
|
|||||||
|
|
||||||
func BenchmarkVariableDetectWalker(b *testing.B) {
|
func BenchmarkVariableDetectWalker(b *testing.B) {
|
||||||
w := new(variableDetectWalker)
|
w := new(variableDetectWalker)
|
||||||
|
|
||||||
str := reflect.ValueOf(`foo ${var.bar} bar ${bar.baz.bing} $${escaped}`)
|
str := reflect.ValueOf(`foo ${var.bar} bar ${bar.baz.bing} $${escaped}`)
|
||||||
|
|
||||||
|
b.ResetTimer()
|
||||||
for i := 0; i < b.N; i++ {
|
for i := 0; i < b.N; i++ {
|
||||||
w.Variables = nil
|
w.Variables = nil
|
||||||
w.Primitive(str)
|
w.Primitive(str)
|
||||||
|
|||||||
Reference in New Issue
Block a user