Record validation performance baseline
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user