A lightweight WebAssembly runtime that is fast, secure, and standards-compliant
Optimize CI timings slightly (#14640)
Alex Crichtonb229cb936b35
diff --git a/Cargo.toml b/Cargo.tomlindex c2f09ae1d9..1fcf121a29 100644--- a/Cargo.toml+++ b/Cargo.toml@@ -723,6 +723,14 @@ opt-level = 's'[profile.dev.package.tokio]overflow-checks = false+# Some CI jobs (e.g. QEMU) build everything in the `dev` profile with+# optimizations via `CARGO_PROFILE_DEV_OPT_LEVEL`. That's not worth it for this+# crate though: its `tests/all` binary is huge and expensive to optimize but is+# mostly glue around the (still optimized) runtime. This is a no-op by default+# since `dev` is already unoptimized.+[profile.dev.package.wasmtime-cli]+opt-level = 0+[profile.profiling]inherits = "bench"debug = "line-tables-only"diff --git a/crates/test-programs/src/bin/p3_http_outbound_request_chunk_size.rs b/crates/test-programs/src/bin/p3_http_outbound_request_chunk_size.rsindex 7b7043da2b..ff60dccc24 100644--- a/crates/test-programs/src/bin/p3_http_outbound_request_chunk_size.rs+++ b/crates/test-programs/src/bin/p3_http_outbound_request_chunk_size.rs@@ -9,9 +9,14 @@ struct Component;test_programs::p3::export!(Component);fn bytes(offset: &mut usize, len: usize) -> Vec<u8> {+ const PATTERN_LEN: usize = 251;+ let pattern: [u8; PATTERN_LEN] = core::array::from_fn(|i| i as u8);let mut buf = Vec::with_capacity(len);- for i in 0..len {- buf.push(((*offset + i) % 251) as u8);+ let mut start = *offset % PATTERN_LEN;+ while buf.len() < len {+ let n = (PATTERN_LEN - start).min(len - buf.len());+ buf.extend_from_slice(&pattern[start..][..n]);+ start = 0;}*offset += len;buf