knockknock

Crates.ioknockknock
lib.rsknockknock
version1.0.2
sourcesrc
created_at2022-04-23 02:53:38.533836
updated_at2022-04-23 04:28:30.431066
descriptionCLI tool for ping protocols
homepagehttps://github.com/zondatw/knock_knock
repositoryhttps://github.com/zondatw/knock_knock
max_upload_size
id572490
size16,391
Zonda Yang (zondatw)

documentation

README

Knock Knock

Cargo

// run
$ cargo run
// build
$ cargo build
// build release
$ cargo build --release
// test $ cargo test

Execution

Ping TCP path

$ knockknock localhost:8000 -c 3
DNS lookup: [[::1]:8000, 127.0.0.1:8000]
localhost:8000: time=   0.86718 ms
localhost:8000: fail
localhost:8000: fail
----- statistic -----
total time: 867.183µs
Connect time: 3, recv time: 1 (33%), lose time: 2 (66%)

Ping UDP path

$ knockknock localhost:12000 -p UDP
DNS lookup: [[::1]:12000, 127.0.0.1:12000]
localhost:12000: time=   0.90438 ms
localhost:12000: fail
localhost:12000: fail
----- statistic -----
total time: 904.381µs
Connect time: 3, recv time: 1 (33%), lose time: 2 (66%)

Ping HTTP path

CONNECT

$ knockknock localhost:8888/haha -p HTTP-CONNECT
DNS lookup: [[::1]:8888, 127.0.0.1:8888]
localhost:8888/haha: time=   2.54041 ms
localhost:8888/haha: time=   2.61254 ms
localhost:8888/haha: time=   3.63613 ms
----- statistic -----
total time: 8.789084ms
Connect time: 3, recv time: 3 (100%), lose time: 0 (0%)

GET

$ knockknock localhost:8888/haha -p HTTP-GET
DNS lookup: [[::1]:8888, 127.0.0.1:8888]
localhost:8888/haha: time=   2.54041 ms
localhost:8888/haha: time=   2.61254 ms
localhost:8888/haha: time=   3.63613 ms
----- statistic -----
total time: 8.789084ms
Connect time: 3, recv time: 3 (100%), lose time: 0 (0%)

POST

$ knockknock localhost:8888/haha -p HTTP-POST
DNS lookup: [[::1]:8888, 127.0.0.1:8888]
localhost:8888/haha: time=   2.54041 ms
localhost:8888/haha: time=   2.61254 ms
localhost:8888/haha: time=   3.63613 ms
----- statistic -----
total time: 8.789084ms
Connect time: 3, recv time: 3 (100%), lose time: 0 (0%)

PUT

$ knockknock localhost:8888/haha -p HTTP-PUT
DNS lookup: [[::1]:8888, 127.0.0.1:8888]
localhost:8888/haha: time=   2.54041 ms
localhost:8888/haha: time=   2.61254 ms
localhost:8888/haha: time=   3.63613 ms
----- statistic -----
total time: 8.789084ms
Connect time: 3, recv time: 3 (100%), lose time: 0 (0%)

DELETE

$ knockknock localhost:8888/haha -p HTTP-DELETE
DNS lookup: [[::1]:8888, 127.0.0.1:8888]
localhost:8888/haha: time=   2.54041 ms
localhost:8888/haha: time=   2.61254 ms
localhost:8888/haha: time=   3.63613 ms
----- statistic -----
total time: 8.789084ms
Connect time: 3, recv time: 3 (100%), lose time: 0 (0%)

PATCH

$ knockknock localhost:8888/haha -p HTTP-PATCH
DNS lookup: [[::1]:8888, 127.0.0.1:8888]
localhost:8888/haha: time=   2.54041 ms
localhost:8888/haha: time=   2.61254 ms
localhost:8888/haha: time=   3.63613 ms
----- statistic -----
total time: 8.789084ms
Connect time: 3, recv time: 3 (100%), lose time: 0 (0%)
Commit count: 82

cargo fmt