Record validation performance baseline

This commit is contained in:
2026-10-09 01:02:05 +00:00
parent ca571aca4f
commit 29e1bab228
6 changed files with 457 additions and 9 deletions

View File

@@ -93,7 +93,7 @@ type gitTreeEntry struct {
hasSize bool
}
func newTreeRepository(t *testing.T) string {
func newTreeRepository(t testing.TB) string {
t.Helper()
repository := t.TempDir()
gitTree(t, repository, "init", "-b", "main")
@@ -102,7 +102,7 @@ func newTreeRepository(t *testing.T) string {
return repository
}
func writeTreeFile(t *testing.T, repository, name string, content []byte) {
func writeTreeFile(t testing.TB, repository, name string, content []byte) {
t.Helper()
path := filepath.Join(repository, filepath.FromSlash(name))
if err := os.MkdirAll(filepath.Dir(path), 0o755); err != nil {
@@ -113,7 +113,7 @@ func writeTreeFile(t *testing.T, repository, name string, content []byte) {
}
}
func gitTree(t *testing.T, repository string, args ...string) string {
func gitTree(t testing.TB, repository string, args ...string) string {
t.Helper()
command := exec.Command("git", args...)
command.Dir = repository