Attempts to introduce escaped unicode decoding#1854
Conversation
|
@bplaxco would love to see if this significantly slows down your benchmarks |
|
Note: I wouldn't call this "good testing", I just kinda ran a few things when I had a minute yesterday evening but didn't really get to sit down and do it careflly. But I figured' I'd share what I got regardless ^_^ Did some basic hyperfine tests (ignore errors, 3 warmups, 10 runs): baseline == master branch I pulled my own gitleaks config just because I wanted to use a consistent set of patterns between these two and the gitleaks command I had installed in my package manager. (note: dir is probably so long because I expect it's going down into the .git dir for the repo and scanning those large files serially) I did one diagnostics run of it against the kubernetes repo: (Note: I had CPU and memory diagnostics running at the same time which probably isn't the best idea for clean results). Thoughts: Looks like the kubernetes repo ends up being a great benchmarking repo, there's lots of b64, percent encoded, unicode escaped data in there. I'd probably be good to do something like this and pick through it, preferably on an idle system: git clone --mirror [email protected]:kubernetes/kubernetes.git
hyperfine \
--export-json unicode-perf.json -w 3 -i \
'./baseline --config gitleaks.toml git --max-decode-depth 8 kubernetes.git' \
'./unicode-decoder --config gitleaks.toml git --max-decode-depth 8 kubernetes.git' \
'./baseline --config gitleaks.toml git kubernetes.git' \
'./unicode-decoder --config gitleaks.toml git kubernetes.git'
# Assuming unicode-decoder is rebased on main
./baseline --diagnostics-dir=baseline-k8s --diagnostics=cpu --config gitleaks.toml git --max-decode-depth 8 kubernetes.git
./unicode-decoder --diagnostics-dir=unicode-k8s --diagnostics=cpu --config gitleaks.toml git --max-decode-depth 8 kubernetes.git |

Description:
Attempts to introduce escaped unicode decoding. This supports two kinds of escaped unicode; standard notation and common escape
\,\\sequences.Checklist: