Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement rudimentary load tester that is able to read public keys from file #29

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
614 changes: 601 additions & 13 deletions Cargo.lock

Large diffs are not rendered by default.

29 changes: 15 additions & 14 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ members = [
"accounts_from_snapshot",
"accounts_on_demand",
"common",
"token_account_storage",
"load_tester",
"simulate_from_snapshot",
"token_account_storage",
]

[workspace.package]
Expand All @@ -30,26 +31,26 @@ solana-runtime = "~2.0.16"
solana-rpc-client-api = "~2.0.16"
solana-download-utils = "~2.0.16"

anyhow = "1.0.70"
arrayref = "0.3.7"
async-trait = "0.1.68"
base64 = "0.21.0"
bincode = "=1.3.3"
bitflags = "2.6.0"
borsh = "0.10.3"
bs58 = "0.4.0"
dashmap = "5.4.0"
serde = { version = "1.0.160", features = ["derive"] }
serde_json = "1.0.96"
futures = "0.3.28"
itertools = "0.10.5"
borsh = "0.10.3"
anyhow = "1.0.70"
lazy_static = "1.4.0"
log = "0.4.17"
bincode = "=1.3.3"
bs58 = "0.4.0"
lz4 = "1.24.0"
zstd = "0.11.2"
prometheus = "0.13.3"
lazy_static = "1.4.0"
base64 = "0.21.0"
futures = "0.3.28"
tracing-subscriber = "0.3.16"
bitflags = "2.6.0"
arrayref = "0.3.7"
serde = { version = "1.0.160", features = ["derive"] }
serde_json = "1.0.96"
tempfile = "3.2.0"
tracing-subscriber = "0.3.16"
zstd = "0.11.2"

spl-token = "6.0.0"
spl-token-2022 = "5.0.2"
Expand Down
6 changes: 3 additions & 3 deletions accounts_from_snapshot/examples/import_archive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub async fn main() {
let (mut accounts_rx, _) =
import_archive(PathBuf::from_str(&snapshot_archive_path).unwrap()).await;

let mut avg_batchsize_cummulator = 0;
let mut avg_batchsize_cumulator = 0;
let mut loop_cnt = 0;
let mut started_at = Instant::now();
let mut cnt_append_vecs: u32 = 0;
Expand All @@ -43,7 +43,7 @@ pub async fn main() {
}
}
trace!("batch size: {}", batch.len());
avg_batchsize_cummulator += batch.len();
avg_batchsize_cumulator += batch.len();

for item in batch.drain(..) {
cnt_append_vecs += 1;
Expand All @@ -62,6 +62,6 @@ pub async fn main() {
// 35
info!(
"Average batch size: {}",
avg_batchsize_cummulator as f64 / loop_cnt as f64
avg_batchsize_cumulator as f64 / loop_cnt as f64
);
}
32 changes: 32 additions & 0 deletions load_tester/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[package]
name = "load-tester"
version = "0.1.0"
edition = "2021"

[[bin]]
name = "load-tester"
path = "src/main.rs"

[dependencies]
solana-account-decoder = { workspace = true }
solana-rpc-client-api = { workspace = true }
spl-token-2022 = { workspace = true }

anyhow = { workspace = true }
async-trait = "^0.1"
base64 = { workspace = true }
clap = { version = "^4.5.4", features = ["derive"] }
env_logger = "^0.11.6"
log = { workspace = true }
rand = "^0.8.5"
reqwest = { version = "^0.12.9", features = [
"brotli",
"deflate",
"gzip",
"rustls-tls",
"json",
] }
rlt = "^0.2.1"
serde = { workspace = true }
serde_json = { workspace = true }
tokio = { workspace = true }
Loading
Loading