Skip to content

Commit e111ed6

Browse files
committed
feat(ci/bench): bench gowitness with hxn via ci/c
1 parent 4efd745 commit e111ed6

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/bench.yml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Bench gowitness with hxn
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test-domains:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v3
16+
17+
- name: Install cargo-binstall and hyperfine
18+
run: |
19+
cargo install cargo-binstall
20+
cargo binstall hyperfine
21+
22+
- name: Install gowitness
23+
run: |
24+
export GOPATH="${XDG_DATA_HOME:-$HOME/.local/share}/go"
25+
export PATH="$PATH:$GOPATH/bin" # Add ~/.local/share/go/bin to path for Golang
26+
sudo apt update
27+
sudo apt install golang -y
28+
go install github.com/sensepost/gowitness@latest
29+
30+
- name: Get 50 URLs
31+
run: |
32+
curl -qfsSL "https://raw.githubusercontent.com/Azathothas/CertStream-Domains/main/Data/np_ccTLDs/certstream_domains_np_all_24h_httpx.txt" |
33+
awk '{print $1}' |
34+
grep -i 'http' |
35+
sort -u |
36+
head -n 50 > urls.txt
37+
38+
- name: Install hxn
39+
run: |
40+
cargo build --release
41+
sudo mv -iv target/release/hxn /usr/local/bin/hxn
42+
43+
- name: Bench gowitness with hxn
44+
run: |
45+
hyperfine --warmup 3 'hxn -f urls.txt -t 50 --timeout 500' 'gowitness -F --timeout 500 file urls.txt'

0 commit comments

Comments
 (0)