pulumi/pkg/codegen/hcl2/binder_schema_test.go
Pat Gavlin 088751a4a8
[codegen/hcl2] Refactor package schema loading. (#4661)
- Move the implementation of loadPackageSchema into a method on
  PackageCache
- Protect the cache with synchronization primitives to enable
  concurrency in downstream consumers
- Use jsoniter to deserialize schemas
2020-05-18 17:35:11 -07:00

18 lines
357 B
Go

package hcl2
import (
"testing"
"github.com/pulumi/pulumi/pkg/v2/codegen/internal/test"
"github.com/pulumi/pulumi/sdk/v2/go/common/util/contract"
)
func BenchmarkLoadPackage(b *testing.B) {
host := test.NewHost(testdataPath)
for n := 0; n < b.N; n++ {
_, err := NewPackageCache().loadPackageSchema(host, "aws")
contract.AssertNoError(err)
}
}