mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 17:55:36 +00:00
rename aquatic to aquatic_udp, same for bench and load test crates
This commit is contained in:
parent
f614bab03d
commit
1b8d74e26d
35 changed files with 53 additions and 53 deletions
10
Cargo.lock
generated
10
Cargo.lock
generated
|
|
@ -22,7 +22,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d9a60d744a80c30fcb657dfe2c1b22bcb3e814c1a1e3674f32bf5820b570fbff"
|
checksum = "d9a60d744a80c30fcb657dfe2c1b22bcb3e814c1a1e3674f32bf5820b570fbff"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "aquatic"
|
name = "aquatic_udp"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bittorrent_udp",
|
"bittorrent_udp",
|
||||||
|
|
@ -43,10 +43,10 @@ dependencies = [
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "aquatic_bench"
|
name = "aquatic_udp_bench"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aquatic",
|
"aquatic_udp",
|
||||||
"bittorrent_udp",
|
"bittorrent_udp",
|
||||||
"cli_helpers",
|
"cli_helpers",
|
||||||
"crossbeam-channel",
|
"crossbeam-channel",
|
||||||
|
|
@ -60,7 +60,7 @@ dependencies = [
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "aquatic_load_test"
|
name = "aquatic_udp_load_test"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bittorrent_udp",
|
"bittorrent_udp",
|
||||||
|
|
@ -82,7 +82,7 @@ dependencies = [
|
||||||
name = "aquatic_ws"
|
name = "aquatic_ws"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aquatic",
|
"aquatic_udp",
|
||||||
"bittorrent_udp",
|
"bittorrent_udp",
|
||||||
"cli_helpers",
|
"cli_helpers",
|
||||||
"flume",
|
"flume",
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
[workspace]
|
[workspace]
|
||||||
|
|
||||||
members = [
|
members = [
|
||||||
"aquatic",
|
"aquatic_udp",
|
||||||
"aquatic_bench",
|
"aquatic_udp_bench",
|
||||||
"aquatic_load_test",
|
"aquatic_udp_load_test",
|
||||||
"aquatic_ws",
|
"aquatic_ws",
|
||||||
"bittorrent_udp",
|
"bittorrent_udp",
|
||||||
"cli_helpers",
|
"cli_helpers",
|
||||||
|
|
@ -11,4 +11,4 @@ members = [
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
debug = true
|
debug = true
|
||||||
lto = true
|
lto = true
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,16 @@
|
||||||
[package]
|
[package]
|
||||||
name = "aquatic"
|
name = "aquatic_udp"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
authors = ["Joakim Frostegård <joakim.frostegard@gmail.com>"]
|
authors = ["Joakim Frostegård <joakim.frostegard@gmail.com>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "aquatic"
|
name = "aquatic_udp"
|
||||||
path = "src/lib/lib.rs"
|
path = "src/lib/lib.rs"
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "aquatic"
|
name = "aquatic_udp"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bittorrent_udp = { path = "../bittorrent_udp" }
|
bittorrent_udp = { path = "../bittorrent_udp" }
|
||||||
|
|
@ -29,4 +29,4 @@ serde = { version = "1", features = ["derive"] }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
quickcheck = "0.9"
|
quickcheck = "0.9"
|
||||||
quickcheck_macros = "0.9"
|
quickcheck_macros = "0.9"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
use aquatic;
|
use aquatic_udp;
|
||||||
use cli_helpers;
|
use cli_helpers;
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -7,8 +7,8 @@ static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
|
||||||
|
|
||||||
|
|
||||||
fn main(){
|
fn main(){
|
||||||
cli_helpers::run_app_with_cli_and_config::<aquatic::config::Config>(
|
cli_helpers::run_app_with_cli_and_config::<aquatic_udp::config::Config>(
|
||||||
"aquatic: udp bittorrent tracker",
|
"aquatic: udp bittorrent tracker",
|
||||||
aquatic::run,
|
aquatic_udp::run,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
@ -1,21 +1,21 @@
|
||||||
[package]
|
[package]
|
||||||
name = "aquatic_bench"
|
name = "aquatic_udp_bench"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
authors = ["Joakim Frostegård <joakim.frostegard@gmail.com>"]
|
authors = ["Joakim Frostegård <joakim.frostegard@gmail.com>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "aquatic_bench"
|
name = "aquatic_udp_bench"
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "bench_handlers"
|
name = "aquatic_udp_bench_handlers"
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "plot_pareto"
|
name = "plot_pareto"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
aquatic = { path = "../aquatic" }
|
aquatic_udp = { path = "../aquatic_udp" }
|
||||||
bittorrent_udp = { path = "../bittorrent_udp" }
|
bittorrent_udp = { path = "../bittorrent_udp" }
|
||||||
cli_helpers = { path = "../cli_helpers" }
|
cli_helpers = { path = "../cli_helpers" }
|
||||||
crossbeam-channel = "0.4"
|
crossbeam-channel = "0.4"
|
||||||
|
|
@ -25,4 +25,4 @@ num-format = "0.4"
|
||||||
plotly = "0.4"
|
plotly = "0.4"
|
||||||
rand = { version = "0.7", features = ["small_rng"] }
|
rand = { version = "0.7", features = ["small_rng"] }
|
||||||
rand_distr = "0.2"
|
rand_distr = "0.2"
|
||||||
serde = { version = "1", features = ["derive"] }
|
serde = { version = "1", features = ["derive"] }
|
||||||
|
|
@ -6,10 +6,10 @@ use indicatif::ProgressIterator;
|
||||||
use rand::Rng;
|
use rand::Rng;
|
||||||
use rand_distr::Pareto;
|
use rand_distr::Pareto;
|
||||||
|
|
||||||
use aquatic::common::*;
|
use aquatic_udp::common::*;
|
||||||
use aquatic::config::Config;
|
use aquatic_udp::config::Config;
|
||||||
|
|
||||||
use aquatic_bench::pareto_usize;
|
use aquatic_udp_bench::pareto_usize;
|
||||||
|
|
||||||
use crate::common::*;
|
use crate::common::*;
|
||||||
use crate::config::BenchConfig;
|
use crate::config::BenchConfig;
|
||||||
|
|
@ -5,8 +5,8 @@ use indicatif::ProgressIterator;
|
||||||
use rand::{Rng, SeedableRng, thread_rng, rngs::SmallRng};
|
use rand::{Rng, SeedableRng, thread_rng, rngs::SmallRng};
|
||||||
use std::net::SocketAddr;
|
use std::net::SocketAddr;
|
||||||
|
|
||||||
use aquatic::common::*;
|
use aquatic_udp::common::*;
|
||||||
use aquatic::config::Config;
|
use aquatic_udp::config::Config;
|
||||||
|
|
||||||
use crate::common::*;
|
use crate::common::*;
|
||||||
use crate::config::BenchConfig;
|
use crate::config::BenchConfig;
|
||||||
|
|
@ -19,9 +19,9 @@ use std::time::Duration;
|
||||||
use num_format::{Locale, ToFormattedString};
|
use num_format::{Locale, ToFormattedString};
|
||||||
use rand::{Rng, thread_rng, rngs::SmallRng, SeedableRng};
|
use rand::{Rng, thread_rng, rngs::SmallRng, SeedableRng};
|
||||||
|
|
||||||
use aquatic::common::*;
|
use aquatic_udp::common::*;
|
||||||
use aquatic::config::Config;
|
use aquatic_udp::config::Config;
|
||||||
use aquatic::handlers;
|
use aquatic_udp::handlers;
|
||||||
use cli_helpers::run_app_with_cli_and_config;
|
use cli_helpers::run_app_with_cli_and_config;
|
||||||
|
|
||||||
use config::BenchConfig;
|
use config::BenchConfig;
|
||||||
|
|
@ -6,10 +6,10 @@ use indicatif::ProgressIterator;
|
||||||
use rand::Rng;
|
use rand::Rng;
|
||||||
use rand_distr::Pareto;
|
use rand_distr::Pareto;
|
||||||
|
|
||||||
use aquatic::common::*;
|
use aquatic_udp::common::*;
|
||||||
use aquatic::config::Config;
|
use aquatic_udp::config::Config;
|
||||||
|
|
||||||
use aquatic_bench::pareto_usize;
|
use aquatic_udp_bench::pareto_usize;
|
||||||
|
|
||||||
use crate::common::*;
|
use crate::common::*;
|
||||||
use crate::config::BenchConfig;
|
use crate::config::BenchConfig;
|
||||||
|
|
@ -4,7 +4,7 @@ use plotly::layout::Axis;
|
||||||
use rand::{thread_rng, rngs::SmallRng, SeedableRng};
|
use rand::{thread_rng, rngs::SmallRng, SeedableRng};
|
||||||
use rand_distr::Pareto;
|
use rand_distr::Pareto;
|
||||||
|
|
||||||
use aquatic_bench::pareto_usize;
|
use aquatic_udp_bench::pareto_usize;
|
||||||
|
|
||||||
|
|
||||||
fn main(){
|
fn main(){
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
[package]
|
[package]
|
||||||
name = "aquatic_load_test"
|
name = "aquatic_udp_load_test"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
authors = ["Joakim Frostegård <joakim.frostegard@gmail.com>"]
|
authors = ["Joakim Frostegård <joakim.frostegard@gmail.com>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "aquatic_load_test"
|
name = "aquatic_udp_load_test"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bittorrent_udp = { path = "../bittorrent_udp" }
|
bittorrent_udp = { path = "../bittorrent_udp" }
|
||||||
|
|
@ -23,4 +23,4 @@ serde = { version = "1", features = ["derive"] }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
quickcheck = "0.9"
|
quickcheck = "0.9"
|
||||||
quickcheck_macros = "0.9"
|
quickcheck_macros = "0.9"
|
||||||
|
|
@ -14,7 +14,7 @@ name = "aquatic_ws"
|
||||||
path = "src/bin/main.rs"
|
path = "src/bin/main.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
aquatic = { path = "../aquatic" }
|
aquatic_udp = { path = "../aquatic_udp" }
|
||||||
bittorrent_udp = { path = "../bittorrent_udp" }
|
bittorrent_udp = { path = "../bittorrent_udp" }
|
||||||
cli_helpers = { path = "../cli_helpers" }
|
cli_helpers = { path = "../cli_helpers" }
|
||||||
flume = "0.7"
|
flume = "0.7"
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ use indexmap::IndexMap;
|
||||||
use parking_lot::Mutex;
|
use parking_lot::Mutex;
|
||||||
use mio::Token;
|
use mio::Token;
|
||||||
|
|
||||||
pub use aquatic::common::ValidUntil;
|
pub use aquatic_udp::common::ValidUntil;
|
||||||
|
|
||||||
use crate::protocol::*;
|
use crate::protocol::*;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ use hashbrown::HashMap;
|
||||||
use parking_lot::MutexGuard;
|
use parking_lot::MutexGuard;
|
||||||
use rand::{Rng, SeedableRng, rngs::SmallRng};
|
use rand::{Rng, SeedableRng, rngs::SmallRng};
|
||||||
|
|
||||||
use aquatic::handlers::{extract_response_peers};
|
use aquatic_udp::handlers::extract_response_peers;
|
||||||
|
|
||||||
use crate::common::*;
|
use crate::common::*;
|
||||||
use crate::protocol::*;
|
use crate::protocol::*;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
export RUSTFLAGS="-C target-cpu=native"
|
|
||||||
|
|
||||||
cargo run --release --bin bench_handlers -- $@
|
|
||||||
5
scripts/bench-udp-handlers.sh
Executable file
5
scripts/bench-udp-handlers.sh
Executable file
|
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
export RUSTFLAGS="-C target-cpu=native"
|
||||||
|
|
||||||
|
cargo run --release --bin aquatic_udp_bench_handlers -- $@
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Profile
|
# Profile
|
||||||
perf record --call-graph=dwarf,16384 -e cpu-clock -F 997 target/release/aquatic
|
perf record --call-graph=dwarf,16384 -e cpu-clock -F 997 target/release/aquatic_udp
|
||||||
|
|
||||||
# Generate flamegraph (make sure nginx is installed for stdout path)
|
# Generate flamegraph (make sure nginx is installed for stdout path)
|
||||||
# Info: https://gist.github.com/dlaehnemann/df31787c41bd50c0fe223df07cf6eb89
|
# Info: https://gist.github.com/dlaehnemann/df31787c41bd50c0fe223df07cf6eb89
|
||||||
|
|
@ -2,4 +2,4 @@
|
||||||
|
|
||||||
export RUSTFLAGS="-C target-cpu=native"
|
export RUSTFLAGS="-C target-cpu=native"
|
||||||
|
|
||||||
cargo run --release --bin aquatic -- $@
|
cargo run --release --bin aquatic_udp -- $@
|
||||||
5
scripts/run-load-test-udp.sh
Executable file
5
scripts/run-load-test-udp.sh
Executable file
|
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
export RUSTFLAGS="-C target-cpu=native"
|
||||||
|
|
||||||
|
cargo run --release --bin aquatic_udp_load_test -- $@
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
export RUSTFLAGS="-C target-cpu=native"
|
|
||||||
|
|
||||||
cargo run --release --bin aquatic_load_test -- $@
|
|
||||||
|
|
@ -53,8 +53,8 @@ cd ..
|
||||||
git clone https://github.com/greatest-ape/aquatic.git
|
git clone https://github.com/greatest-ape/aquatic.git
|
||||||
cd aquatic
|
cd aquatic
|
||||||
export RUSTFLAGS="-C target-cpu=native"
|
export RUSTFLAGS="-C target-cpu=native"
|
||||||
cargo build --release --bin aquatic
|
cargo build --release --bin aquatic_udp
|
||||||
cargo build --release --bin aquatic_load_test
|
cargo build --release --bin aquatic_udp_load_test
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
# Download flamegraph stuff
|
# Download flamegraph stuff
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue