fix: 将 libsql-client-go 作为普通目录提交,而非 gitlink

This commit is contained in:
2026-04-27 07:04:46 +08:00
parent 2359d6c9fa
commit f6332fbaaf
52 changed files with 42333 additions and 1 deletions

View File

@@ -0,0 +1,25 @@
package sqliteparserutils
import (
"runtime"
"strings"
"testing"
)
func BenchmarkSplitStatement(b *testing.B) {
var (
mem runtime.MemStats
count = 8192
)
hugeStatement := strings.Repeat("INSERT INTO t VALUES (1, 2, 3, 4, 5, 6, 7, 8, 9, 10);", count)
for i := 0; i < b.N; i++ {
statements, _ := SplitStatement(hugeStatement)
if len(statements) != count {
b.Fail()
}
// these intermediate logs can help to estimate memory working set (instead of total allocations)
runtime.ReadMemStats(&mem)
b.Logf("heap in use: %v", mem.HeapInuse)
}
}