Reformat imports to a consistent style for imports
rustfmt.toml configuration: imports_granularity = "One" group_imports = "One"
This commit is contained in:
@ -3,30 +3,32 @@
|
||||
|
||||
extern crate test;
|
||||
|
||||
use dashmap::DashMap;
|
||||
use rand::Rng;
|
||||
use rayon::iter::{IntoParallelRefIterator, ParallelIterator};
|
||||
use solana_runtime::{
|
||||
accounts::{create_test_accounts, AccountAddressFilter, Accounts},
|
||||
accounts_db::AccountShrinkThreshold,
|
||||
accounts_index::{AccountSecondaryIndexes, ScanConfig},
|
||||
ancestors::Ancestors,
|
||||
bank::*,
|
||||
use {
|
||||
dashmap::DashMap,
|
||||
rand::Rng,
|
||||
rayon::iter::{IntoParallelRefIterator, ParallelIterator},
|
||||
solana_runtime::{
|
||||
accounts::{create_test_accounts, AccountAddressFilter, Accounts},
|
||||
accounts_db::AccountShrinkThreshold,
|
||||
accounts_index::{AccountSecondaryIndexes, ScanConfig},
|
||||
ancestors::Ancestors,
|
||||
bank::*,
|
||||
},
|
||||
solana_sdk::{
|
||||
account::{AccountSharedData, ReadableAccount},
|
||||
genesis_config::{create_genesis_config, ClusterType},
|
||||
hash::Hash,
|
||||
lamports::LamportsError,
|
||||
pubkey::Pubkey,
|
||||
},
|
||||
std::{
|
||||
collections::{HashMap, HashSet},
|
||||
path::PathBuf,
|
||||
sync::{Arc, RwLock},
|
||||
thread::Builder,
|
||||
},
|
||||
test::Bencher,
|
||||
};
|
||||
use solana_sdk::{
|
||||
account::{AccountSharedData, ReadableAccount},
|
||||
genesis_config::{create_genesis_config, ClusterType},
|
||||
hash::Hash,
|
||||
lamports::LamportsError,
|
||||
pubkey::Pubkey,
|
||||
};
|
||||
use std::{
|
||||
collections::{HashMap, HashSet},
|
||||
path::PathBuf,
|
||||
sync::{Arc, RwLock},
|
||||
thread::Builder,
|
||||
};
|
||||
use test::Bencher;
|
||||
|
||||
fn deposit_many(bank: &Bank, pubkeys: &mut Vec<Pubkey>, num: usize) -> Result<(), LamportsError> {
|
||||
for t in 0..num {
|
||||
|
@ -2,15 +2,17 @@
|
||||
|
||||
extern crate test;
|
||||
|
||||
use rand::{thread_rng, Rng};
|
||||
use solana_runtime::{
|
||||
accounts_db::AccountInfo,
|
||||
accounts_index::{
|
||||
AccountSecondaryIndexes, AccountsIndex, ACCOUNTS_INDEX_CONFIG_FOR_BENCHMARKS,
|
||||
use {
|
||||
rand::{thread_rng, Rng},
|
||||
solana_runtime::{
|
||||
accounts_db::AccountInfo,
|
||||
accounts_index::{
|
||||
AccountSecondaryIndexes, AccountsIndex, ACCOUNTS_INDEX_CONFIG_FOR_BENCHMARKS,
|
||||
},
|
||||
},
|
||||
solana_sdk::pubkey::{self, Pubkey},
|
||||
test::Bencher,
|
||||
};
|
||||
use solana_sdk::pubkey::{self, Pubkey};
|
||||
use test::Bencher;
|
||||
|
||||
#[bench]
|
||||
fn bench_accounts_index(bencher: &mut Bencher) {
|
||||
|
@ -1,19 +1,20 @@
|
||||
#![feature(test)]
|
||||
extern crate test;
|
||||
|
||||
use rand::{thread_rng, Rng};
|
||||
use solana_runtime::append_vec::{
|
||||
test_utils::{create_test_account, get_append_vec_path},
|
||||
AppendVec,
|
||||
use {
|
||||
rand::{thread_rng, Rng},
|
||||
solana_runtime::append_vec::{
|
||||
test_utils::{create_test_account, get_append_vec_path},
|
||||
AppendVec,
|
||||
},
|
||||
solana_sdk::{account::ReadableAccount, hash::Hash},
|
||||
std::{
|
||||
sync::{Arc, Mutex},
|
||||
thread::{sleep, spawn},
|
||||
time::Duration,
|
||||
},
|
||||
test::Bencher,
|
||||
};
|
||||
use solana_sdk::{account::ReadableAccount, hash::Hash};
|
||||
use std::{
|
||||
sync::{Arc, Mutex},
|
||||
thread::sleep,
|
||||
thread::spawn,
|
||||
time::Duration,
|
||||
};
|
||||
use test::Bencher;
|
||||
|
||||
#[bench]
|
||||
fn append_vec_append(bencher: &mut Bencher) {
|
||||
|
@ -3,22 +3,23 @@
|
||||
|
||||
extern crate test;
|
||||
|
||||
use log::*;
|
||||
use solana_program_runtime::invoke_context::InvokeContext;
|
||||
use solana_runtime::{bank::*, bank_client::BankClient, loader_utils::create_invoke_instruction};
|
||||
use solana_sdk::{
|
||||
client::AsyncClient,
|
||||
client::SyncClient,
|
||||
clock::MAX_RECENT_BLOCKHASHES,
|
||||
genesis_config::create_genesis_config,
|
||||
instruction::InstructionError,
|
||||
message::Message,
|
||||
pubkey::Pubkey,
|
||||
signature::{Keypair, Signer},
|
||||
transaction::Transaction,
|
||||
use {
|
||||
log::*,
|
||||
solana_program_runtime::invoke_context::InvokeContext,
|
||||
solana_runtime::{bank::*, bank_client::BankClient, loader_utils::create_invoke_instruction},
|
||||
solana_sdk::{
|
||||
client::{AsyncClient, SyncClient},
|
||||
clock::MAX_RECENT_BLOCKHASHES,
|
||||
genesis_config::create_genesis_config,
|
||||
instruction::InstructionError,
|
||||
message::Message,
|
||||
pubkey::Pubkey,
|
||||
signature::{Keypair, Signer},
|
||||
transaction::Transaction,
|
||||
},
|
||||
std::{sync::Arc, thread::sleep, time::Duration},
|
||||
test::Bencher,
|
||||
};
|
||||
use std::{sync::Arc, thread::sleep, time::Duration};
|
||||
use test::Bencher;
|
||||
|
||||
const BUILTIN_PROGRAM_ID: [u8; 32] = [
|
||||
98, 117, 105, 108, 116, 105, 110, 95, 112, 114, 111, 103, 114, 97, 109, 95, 105, 100, 0, 0, 0,
|
||||
|
@ -1,17 +1,18 @@
|
||||
#![feature(test)]
|
||||
|
||||
extern crate test;
|
||||
use bv::BitVec;
|
||||
use fnv::FnvHasher;
|
||||
use rand::Rng;
|
||||
use solana_runtime::bloom::{AtomicBloom, Bloom, BloomHashIndex};
|
||||
use solana_sdk::{
|
||||
hash::{hash, Hash},
|
||||
signature::Signature,
|
||||
use {
|
||||
bv::BitVec,
|
||||
fnv::FnvHasher,
|
||||
rand::Rng,
|
||||
solana_runtime::bloom::{AtomicBloom, Bloom, BloomHashIndex},
|
||||
solana_sdk::{
|
||||
hash::{hash, Hash},
|
||||
signature::Signature,
|
||||
},
|
||||
std::{collections::HashSet, hash::Hasher},
|
||||
test::Bencher,
|
||||
};
|
||||
use std::collections::HashSet;
|
||||
use std::hash::Hasher;
|
||||
use test::Bencher;
|
||||
|
||||
#[bench]
|
||||
#[ignore]
|
||||
|
@ -2,13 +2,15 @@
|
||||
|
||||
extern crate test;
|
||||
|
||||
use bincode::serialize;
|
||||
use solana_runtime::status_cache::*;
|
||||
use solana_sdk::{
|
||||
hash::{hash, Hash},
|
||||
signature::Signature,
|
||||
use {
|
||||
bincode::serialize,
|
||||
solana_runtime::status_cache::*,
|
||||
solana_sdk::{
|
||||
hash::{hash, Hash},
|
||||
signature::Signature,
|
||||
},
|
||||
test::Bencher,
|
||||
};
|
||||
use test::Bencher;
|
||||
|
||||
type BankStatusCache = StatusCache<()>;
|
||||
|
||||
|
Reference in New Issue
Block a user