Fix runtime benches

This commit is contained in:
Greg Fitzgerald 2019-03-25 14:10:56 -06:00
parent 34c051f183
commit 573dec63da
4 changed files with 8 additions and 4 deletions

View File

@ -40,6 +40,10 @@ fi
BENCH_FILE=bench_output.log BENCH_FILE=bench_output.log
BENCH_ARTIFACT=current_bench_results.log BENCH_ARTIFACT=current_bench_results.log
# Run runtime benches
_ cargo +$rust_nightly bench --manifest-path runtime/Cargo.toml ${V:+--verbose} \
-- -Z unstable-options --format=json | tee "$BENCH_FILE"
# Run core benches # Run core benches
_ cargo +$rust_nightly bench --manifest-path core/Cargo.toml ${V:+--verbose} \ _ cargo +$rust_nightly bench --manifest-path core/Cargo.toml ${V:+--verbose} \
-- -Z unstable-options --format=json | tee "$BENCH_FILE" -- -Z unstable-options --format=json | tee "$BENCH_FILE"

View File

@ -23,7 +23,7 @@ fn bench_process_transaction(bencher: &mut Bencher) {
let rando0 = Keypair::new(); let rando0 = Keypair::new();
let tx = SystemTransaction::new_move( let tx = SystemTransaction::new_move(
&mint_keypair, &mint_keypair,
rando0.pubkey(), &rando0.pubkey(),
10_000, 10_000,
bank.last_blockhash(), bank.last_blockhash(),
0, 0,
@ -33,7 +33,7 @@ fn bench_process_transaction(bencher: &mut Bencher) {
// Seed the 'to' account and a cell for its signature. // Seed the 'to' account and a cell for its signature.
let rando1 = Keypair::new(); let rando1 = Keypair::new();
let tx = let tx =
SystemTransaction::new_move(&rando0, rando1.pubkey(), 1, bank.last_blockhash(), 0); SystemTransaction::new_move(&rando0, &rando1.pubkey(), 1, bank.last_blockhash(), 0);
assert_eq!(bank.process_transaction(&tx), Ok(())); assert_eq!(bank.process_transaction(&tx), Ok(()));
// Finally, return the transaction to the benchmark. // Finally, return the transaction to the benchmark.

View File

@ -2,7 +2,7 @@
extern crate test; extern crate test;
use solana_runtime::*; use solana_runtime::runtime::*;
use test::Bencher; use test::Bencher;
#[bench] #[bench]

View File

@ -6,7 +6,7 @@ mod blockhash_queue;
pub mod bloom; pub mod bloom;
pub mod loader_utils; pub mod loader_utils;
mod native_loader; mod native_loader;
mod runtime; pub mod runtime;
mod status_cache; mod status_cache;
mod system_program; mod system_program;