diff --git a/README.md b/README.md index 577c749..c6ca8c2 100644 --- a/README.md +++ b/README.md @@ -106,6 +106,16 @@ curl -k -v https://localhost:6442/server2/1 #### cd ../wrk; +./wrk 'http://localhost:8402' -d 1m -c 1000 -t 1; +./wrk 'http://localhost:8403' -d 15s -c 10 -t 1; +./wrk 'http://localhost:8404' -d 15s -c 10 -t 10; +./wrk 'http://localhost:8405' -d 35s -c 80 -t 5; +./wrk 'https://localhost:6442/' -d 15s -c 10 -t 1; +./wrk 'https://localhost:6443/' -d 15s -c 10 -t 1; +./wrk 'https://localhost:6444/' -d 25s -c 80 -t 10; +./wrk 'https://localhost:6445/' -d 15s -c 10 -t 1; +### or +cd ../wrk2; ./wrk 'http://localhost:8402' -d 1m -c 1000 -t 1 -R40000 --latency; ./wrk 'http://localhost:8403' -d 15s -c 10 -t 1 -R40000 --latency; ./wrk 'http://localhost:8404' -d 15s -c 10 -t 10 -R40000 --latency; @@ -152,6 +162,28 @@ curl http://localhost:8081 ### manually kill the monolake process kill -15 $(ps aux | grep 'code-coverage-monolake' | awk '{print $2}') +### thrift config +RUST_LOG=debug target/debug/code-coverage-monolake -c examples/thrift-2.toml & + +### build thrift test case (client/server) + +#### check out code +cd .. +git clone https://code.byted.org/rust-lang/lust +cd lust/example/ + +#### change in examples/unknown/src/thrift/client.rs 0.0.0.0:8081 -> 0.0.0.0:8082 + +#### build +cargo build + +### run thrift test +cargo run --bin unknown-hello-server & +cargo run --bin unknown-hello-client + +### manually kill the monolake process +kill -15 $(ps aux | grep 'code-coverage-monolake' | awk '{print $2}') + ## run code coverage test for code-coverage-monolake-sync and all configs again RUST_LOG=debug target/debug/code-coverage-monolake-sync -c examples/config.toml & diff --git a/examples/thrift-2.toml b/examples/thrift-2.toml new file mode 100644 index 0000000..04d35cd --- /dev/null +++ b/examples/thrift-2.toml @@ -0,0 +1,25 @@ +[runtime] +runtime_type = "legacy" +worker_threads = 1 +entries = 1024 + + +[servers.thrift_proxy] +name = "thrift_proxy" +proxy_type = "thrift" +listener = { type = "socket", value = "0.0.0.0:8082" } + +[[servers.thrift_proxy.routes]] +path = '/' +upstreams = [{ endpoint = { type = "socket", value = "127.0.0.1:8081" } }] + +[servers.thrift_proxy_uds] +name = "thrift_proxy" +proxy_type = "thrift" +listener = { type = "unix", value = "/tmp/thrift_proxy_monolake.sock" } + +[[servers.thrift_proxy_uds.routes]] +path = '/' +upstreams = [ + { endpoint = { type = "unix", value = "/tmp/thrift_server_monolake.sock" } }, +]