8000 [v6-exp] plumbing: packfile, Refactor Parser and Scanner logic by pjbgf · Pull Request #1228 · go-git/go-git · GitHub
[go: up one dir, main page]

Skip to content

[v6-exp] plumbing: packfile, Refactor Parser and Scanner logic #1228

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Dec 17, 2024
Prev Previous commit
Next Next commit
git: Add performance tracing for PlainClone operations
Signed-off-by: Paulo Gomes <pjbgf@linux.com>
  • Loading branch information
pjbgf committed Nov 17, 2024
commit 845180dae8ec6645136d2f262f72934d5e3062d9
9 changes: 9 additions & 0 deletions repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,15 @@ func PlainClone(path string, isBare bool, o *CloneOptions) (*Repository, error)
// TODO(mcuadros): move isBare to CloneOptions in v5
// TODO(smola): refuse upfront to clone on a non-empty directory in v5, see #1027
func PlainCloneContext(ctx context.Context, path string, isBare bool, o *CloneOptions) (*Repository, error) {
start := time.Now()
defer func() {
url := ""
if o != nil {
url = o.URL
}
trace.Performance.Printf("performance: %.9f s: git command: git clone %s", time.Since(start).Seconds(), url)
}()

cleanup, cleanupParent, err := checkIfCleanupIsNeeded(path)
if err != nil {
return nil, err
Expand Down
0