Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
zh-jq-b committed Aug 11, 2023
1 parent 9d05417 commit 4dcc2fc
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 3 deletions.
44 changes: 42 additions & 2 deletions g3bench/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# g3bench

Benchmark tool for many targets.
Benchmark tool for HTTP 1.x / HTTP 2 / HTTP 3 / TLS Handshake / DNS / Cloudflare Keyless.

## Features

Expand Down Expand Up @@ -54,4 +54,44 @@ Benchmark tool for many targets.

- Metrics Types
* Target level metrics
- Backend: statsd, so we can support multiple backends via statsd implementations
- Protocol: StatsD

# Examples

## Test a Http Server

```shell
# http, 100 concurrency, for 20 seconds
g3bench h1 http://example.net/echo1k -t 20s -c 100
# https, 100 concurrency, for 20 seconds
g3bench h1 https://example.net/echo1k -t 20s -c 100
# https, no keep-alive, 100 concurrency, for 20 seconds
g3bench h1 https://example.net/echo1k -t 20s -c 100 --no-keepalive
# using TLS 1.2 cipher ECDHE-RSA-AES256-GCM-SHA384
g3bench h1 https://example.net/echo1k -t 20s -c 100 --tls-protocol tls1.2 --tls-ciphers ECDHE-RSA-AES256-GCM-SHA384
```

## Test a Http Proxy

```shell
# using HTTP Forward, 100 concurrency, for 20 seconds
g3bench h1 -x http://192.168.1.1:3128 http://example.net/echo1k -t 20s -c 100
# using HTTPS Forward, 100 concurrency, for 20 seconds
g3bench h1 -x http://192.168.1.1:3128 https://example.net/echo1k -t 20s -c 100
# using HTTP CONNECT, 100 concurrency, for 20 seconds
g3bench h1 -x http://192.168.1.1:3128 -p https://example.net/echo1k -t 20s -c 100
# disable HTTP Keep-Alive
g3bench h1 -x http://192.168.1.1:3128 http://example.net/echo1k --no-keepalive -t 20s -c 100
```

## Test DNS

```shell
# DNS over TLS, via Cloudflare Public DNS
g3bench dns "1.1.1.1" -e dot www.example.com,A --dump-result
# DNS over HTTPS, via Cloudflare Public DNS
g3bench dns "1.1.1.1" -e doh www.example.com,A --dump-result
# DNS over Quic, via AdGuard Public DNS
g3bench dns "94.140.14.140" -e doq www.example.com,A --dump-result
g3bench dns "2a10:50c0::1:ff" -e doq --tls-name unfiltered.adguard-dns.com www.example.com,A --dump-result
```
2 changes: 1 addition & 1 deletion g3proxy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ tcp streaming / tls streaming / transparent proxy / reverse proxy.
* Escaper level metrics
* User level metrics
* User-Site level metrics
- Backend: statsd, so we can support multiple backends via statsd implementations
- Protocol: StatsD

## Documents

Expand Down

0 comments on commit 4dcc2fc

Please sign in to comment.