Upgrades to Rust 1.65.0 (#28741)
This commit is contained in:
parent
7f8d37c011
commit
4d6653598b
|
@ -1,4 +1,4 @@
|
||||||
FROM solanalabs/rust:1.64.0
|
FROM solanalabs/rust:1.65.0
|
||||||
ARG date
|
ARG date
|
||||||
|
|
||||||
RUN set -x \
|
RUN set -x \
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Note: when the rust version is changed also modify
|
# Note: when the rust version is changed also modify
|
||||||
# ci/rust-version.sh to pick up the new image tag
|
# ci/rust-version.sh to pick up the new image tag
|
||||||
FROM rust:1.64.0
|
FROM rust:1.65.0
|
||||||
|
|
||||||
# Add Google Protocol Buffers for Libra's metrics library.
|
# Add Google Protocol Buffers for Libra's metrics library.
|
||||||
ENV PROTOC_VERSION 3.8.0
|
ENV PROTOC_VERSION 3.8.0
|
||||||
|
|
|
@ -18,13 +18,13 @@
|
||||||
if [[ -n $RUST_STABLE_VERSION ]]; then
|
if [[ -n $RUST_STABLE_VERSION ]]; then
|
||||||
stable_version="$RUST_STABLE_VERSION"
|
stable_version="$RUST_STABLE_VERSION"
|
||||||
else
|
else
|
||||||
stable_version=1.64.0
|
stable_version=1.65.0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n $RUST_NIGHTLY_VERSION ]]; then
|
if [[ -n $RUST_NIGHTLY_VERSION ]]; then
|
||||||
nightly_version="$RUST_NIGHTLY_VERSION"
|
nightly_version="$RUST_NIGHTLY_VERSION"
|
||||||
else
|
else
|
||||||
nightly_version=2022-09-22
|
nightly_version=2022-11-02
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -360,6 +360,7 @@ pub fn retransmitter(
|
||||||
let mut stats = RetransmitStats::new(Instant::now());
|
let mut stats = RetransmitStats::new(Instant::now());
|
||||||
let mut shreds_received = LruCache::<ShredId, _>::new(DEFAULT_LRU_SIZE);
|
let mut shreds_received = LruCache::<ShredId, _>::new(DEFAULT_LRU_SIZE);
|
||||||
let mut packet_hasher = PacketHasher::default();
|
let mut packet_hasher = PacketHasher::default();
|
||||||
|
#[allow(clippy::manual_clamp)]
|
||||||
let num_threads = get_thread_count().min(8).max(sockets.len());
|
let num_threads = get_thread_count().min(8).max(sockets.len());
|
||||||
let thread_pool = ThreadPoolBuilder::new()
|
let thread_pool = ThreadPoolBuilder::new()
|
||||||
.num_threads(num_threads)
|
.num_threads(num_threads)
|
||||||
|
|
|
@ -44,13 +44,13 @@ fn bench_verify_account_changes_data(bencher: &mut Bencher) {
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
});
|
});
|
||||||
let summary = bencher.bench(|_bencher| {}).unwrap();
|
let summary = bencher.bench(|_bencher| Ok(())).unwrap().unwrap();
|
||||||
info!("data no change by owner: {} ns/iter", summary.median);
|
info!("data no change by owner: {} ns/iter", summary.median);
|
||||||
|
|
||||||
let pre_data = vec![BUFSIZE];
|
let pre_data = vec![BUFSIZE];
|
||||||
let post_data = vec![BUFSIZE];
|
let post_data = vec![BUFSIZE];
|
||||||
bencher.iter(|| pre_data == post_data);
|
bencher.iter(|| pre_data == post_data);
|
||||||
let summary = bencher.bench(|_bencher| {}).unwrap();
|
let summary = bencher.bench(|_bencher| Ok(())).unwrap().unwrap();
|
||||||
info!("data compare {} ns/iter", summary.median);
|
info!("data compare {} ns/iter", summary.median);
|
||||||
|
|
||||||
let pre = PreAccount::new(
|
let pre = PreAccount::new(
|
||||||
|
@ -68,7 +68,7 @@ fn bench_verify_account_changes_data(bencher: &mut Bencher) {
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
});
|
});
|
||||||
let summary = bencher.bench(|_bencher| {}).unwrap();
|
let summary = bencher.bench(|_bencher| Ok(())).unwrap().unwrap();
|
||||||
info!("data no change by non owner: {} ns/iter", summary.median);
|
info!("data no change by non owner: {} ns/iter", summary.median);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -148,7 +148,7 @@ fn bench_program_alu(bencher: &mut Bencher) {
|
||||||
.unwrap();
|
.unwrap();
|
||||||
});
|
});
|
||||||
let instructions = vm.get_total_instruction_count();
|
let instructions = vm.get_total_instruction_count();
|
||||||
let summary = bencher.bench(|_bencher| {}).unwrap();
|
let summary = bencher.bench(|_bencher| Ok(())).unwrap().unwrap();
|
||||||
println!(" {:?} instructions", instructions);
|
println!(" {:?} instructions", instructions);
|
||||||
println!(" {:?} ns/iter median", summary.median as u64);
|
println!(" {:?} ns/iter median", summary.median as u64);
|
||||||
assert!(0f64 != summary.median);
|
assert!(0f64 != summary.median);
|
||||||
|
@ -168,7 +168,7 @@ fn bench_program_alu(bencher: &mut Bencher) {
|
||||||
);
|
);
|
||||||
|
|
||||||
bencher.iter(|| vm.execute_program_jit(&mut instruction_meter).unwrap());
|
bencher.iter(|| vm.execute_program_jit(&mut instruction_meter).unwrap());
|
||||||
let summary = bencher.bench(|_bencher| {}).unwrap();
|
let summary = bencher.bench(|_bencher| Ok(())).unwrap().unwrap();
|
||||||
println!(" {:?} instructions", instructions);
|
println!(" {:?} instructions", instructions);
|
||||||
println!(" {:?} ns/iter median", summary.median as u64);
|
println!(" {:?} ns/iter median", summary.median as u64);
|
||||||
assert!(0f64 != summary.median);
|
assert!(0f64 != summary.median);
|
||||||
|
|
|
@ -156,7 +156,7 @@ fn do_bench_transactions(
|
||||||
bench_work(&bank, &bank_client, &transactions);
|
bench_work(&bank, &bank_client, &transactions);
|
||||||
});
|
});
|
||||||
|
|
||||||
let summary = bencher.bench(|_bencher| {}).unwrap();
|
let summary = bencher.bench(|_bencher| Ok(())).unwrap().unwrap();
|
||||||
info!(" {:?} transactions", transactions.len());
|
info!(" {:?} transactions", transactions.len());
|
||||||
info!(" {:?} ns/iter median", summary.median as u64);
|
info!(" {:?} ns/iter median", summary.median as u64);
|
||||||
assert!(0f64 != summary.median);
|
assert!(0f64 != summary.median);
|
||||||
|
|
Loading…
Reference in New Issue