Remove flamegraph bits

This commit is contained in:
James Wilson
2021-07-19 17:11:31 +01:00
parent 73a4dbb095
commit 36c4e7b0ef
3 changed files with 9 additions and 36 deletions
+7 -34
View File
@@ -16,38 +16,6 @@ sudo sysctl -w kern.ipc.maxsockbuf=16777216
In general, if you run into issues, it may be better to run this on a linux
box; MacOS seems to hit limits quicker in general.
We can profile execution using cargo-flamegraph to learn more about how long
we spend in each function.
The main thing to do is install it:
```sh
cargo install flamegraph
```
Now, start processes running ourselves (so that we can use flamegraph on them):
In one terminal (in the `backend` folder of this repo):
```sh
sudo cargo flamegraph -o telemetry_core.svg --bin telemetry_core
```
And in another:
```sh
sudo cargo flamegraph -o telemetry_shard.svg --bin telemetry_shard
```
And then, in a third terminal, we can run our general soak test against these:
```sh
SOAK_TEST_ARGS='--feeds 100 --nodes 100 --shards 4' \
TELEMETRY_SUBMIT_HOSTS='127.0.0.1:8001' \
TELEMETRY_FEED_HOST='127.0.0.1:8000' \
cargo test -- soak_test --ignored --nocapture
```
*/
use futures::{ StreamExt };
@@ -67,12 +35,17 @@ use common::node_types::BlockHash;
/// SOAK_TEST_ARGS='--feeds 10 --nodes 100 --shards 4' cargo test -- soak_test --ignored --nocapture
/// ```
///
/// You can also run this test against the pre-sharding actix binary like so:
/// You can also run this test against the pre-sharding actix binary with something like this:
/// ```sh
/// TELEMETRY_BIN=~/old_telemetry_binary SOAK_TEST_ARGS='--feeds 100 --nodes 100 --shards 4' cargo test -- soak_test --ignored --nocapture
/// ```
///
/// Both will establish the same total number of connections and same the same messages.
/// Or, you can run it against existing processes with something like this:
/// ```sh
/// TELEMETRY_SUBMIT_HOSTS='127.0.0.1:8001' TELEMETRY_FEED_HOST='127.0.0.1:8000' SOAK_TEST_ARGS='--feeds 100 --nodes 100 --shards 4' cargo test -- soak_test --ignored --nocapture
/// ```
///
/// Each will establish the same total number of connections and send the same messages.
#[ignore]
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
pub async fn soak_test() {