feat: identify slow file (#1479)

This commit is contained in:
Richard Gomez authored and GitHub committed 2025-05-01 07:39:13 -05:00
1 parent 9609928c02
commit 88f56d3695
3 files changed
+25

No files matched your search

+5
View File
@@ -9,6 +9,7 @@ import (
"strings"
"sync"
"sync/atomic"
"time"
"github.com/zricethezav/gitleaks/v8/config"
"github.com/zricethezav/gitleaks/v8/logging"
@@ -25,6 +26,10 @@ import (
const (
gitleaksAllowSignature = "gitleaks:allow"
chunkSize = 100 * 1_000 // 100kb
// SlowWarningThreshold is the amount of time to wait before logging that a file is slow.
// This is useful for identifying problematic files and tuning the allowlist.
SlowWarningThreshold = 5 * time.Second
)
var (