chore: fix stress test (#3233)

This commit is contained in:
Blas Rodriguez Irizar 2020-12-08 23:38:25 +01:00 committed by GitHub
parent e01391351b
commit fc7a4b3c6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -1,5 +1,6 @@
name: Stress Test name: Stress Test
on: on:
pull_request:
push: push:
branches: branches:
- master - master
@ -18,12 +19,12 @@ jobs:
run: rustup update stable run: rustup update stable
- name: Install Valgrind - name: Install Valgrind
run: apt install -y valgrind run: sudo apt-get install -y valgrind
# Compiles each of the stress test examples. # Compiles each of the stress test examples.
- name: Compile stress test examples - name: Compile stress test examples
run: cargo build -p stress-test --release --examples ${{ matrix.stress-test }} run: cargo build -p stress-test --release --example ${{ matrix.stress-test }}
# Runs each of the examples using Valgrind. Detects leaks and displays them. # Runs each of the examples using Valgrind. Detects leaks and displays them.
- name: Run valgrind - name: Run valgrind
run: valgrind --leak-check=full --show-leak-kinds=all ./target/release/${{ matrix.stress-test }} run: valgrind --leak-check=full --show-leak-kinds=all ./target/release/examples/${{ matrix.stress-test }}

View File

@ -9,7 +9,7 @@ use tokio::{
}; };
const TCP_ENDPOINT: &str = "127.0.0.1:8080"; const TCP_ENDPOINT: &str = "127.0.0.1:8080";
const NUM_MSGS: usize = 10_000; const NUM_MSGS: usize = 100;
const MSG_SIZE: usize = 1024; const MSG_SIZE: usize = 1024;
fn main() { fn main() {