diff --git a/.licenserc.yaml b/.licenserc.yaml index 0b3d562..1cb993e 100644 --- a/.licenserc.yaml +++ b/.licenserc.yaml @@ -19,5 +19,6 @@ header: - 'internal/native/avx2/native_subr_amd64.go' # auto-generated by asm2asm - 'internal/resolver/asm.s' # empty file - 'internal/rt/asm.s' # empty file + - 'internal/loader/asm.s' # empty file comment: on-failure \ No newline at end of file diff --git a/ast/encode_test.go b/ast/encode_test.go index 533d2de..614a9d4 100644 --- a/ast/encode_test.go +++ b/ast/encode_test.go @@ -17,12 +17,47 @@ package ast import ( - `encoding/json` - `testing` + `encoding/json` + `testing` + `runtime` + `runtime/debug` + `sync` - `github.com/bytedance/sonic/internal/native/types` + `github.com/bytedance/sonic/internal/native/types` ) +func TestGC_Encode(t *testing.T) { + root, err := NewSearcher(_TwitterJson).GetByPath() + if err != nil { + t.Fatal(err) + } + root.LoadAll() + _, err = root.MarshalJSON() + if err != nil { + t.Fatal(err) + } + wg := &sync.WaitGroup{} + N := 10000 + for i:=0; i