-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Hello Spoopy Hackers ghost
Welcome to Hacktoberfest 🧙♀️
This issue is exclusively for Hacktoberfest! :)
Our contributing guidelines are here:
https://github.com/RustScan/RustScan/wiki/Contributing
What this issue is
Problem
RustScan is designed to be fast. But sometimes we make changes which make RustScan very slow.
Solution
We would like continuous integration that tests the speed of RustScan and fails if it's under a certain time limit. For example:
command | time in seconds
rustscan --no-nmap 127.0.0.1
- 3 seconds
rustscan --no-nmap -u 5000 -b 2500 google.com
- 28 seconds
rustscan --no-nmap -u 5000 -b 2500 example.com
- 28 seconds
rustscan --no-nmap -u 5000 -b 2500 rustscan.cmnatic.co.uk
- 26 seconds
If any of these tests are slower than the times mentioned, fail the CI.
This is a benchmark test -- however if you can make sure a port is open. At least port 80. You can get a list of ports by running rustscan with --greppable
.
And from here you can check the open ports.
We have Rust code for measuring the timing of RustScan here:
https://github.com/RustScan/RustScan/blob/master/src/benchmark/mod.rs
However, you may use Python if you'd like. So long as the CI fails / passes correctly.
We use Travis CI for our CI, however you can use GitHub actions if you'd like.
You can either call RustScan via a Rust Test, or using Python to call RustScan via the terminal (but you will have to write CI that downloads RustScan's latest branch and builds it).
Code Expert
As part of this issue you will get someone familiar with the code to answer questions on it. The timing benchmark is written by @bergabman , so any questions about that please ask them.
For CI please speak to @bee-san or @CMNatic .
EDIT
I think https://crates.io/crates/criterion works very well here.