implement per-thread, per-batch sleep in ms (throttling allows easier UI dev) (#2293)

* implement per-thread, per-batch sleep in ms (throttling allows easier UI development)
* tidy up sleep() call with Duration::from_millis() instead of Duration::new()
* fixup indentation style
* removing multinode-demo/client-throttled.sh (same functionality available via arguments)
This commit is contained in:
Sunny Gleason
2019-01-03 17:16:06 -05:00
committed by GitHub
parent 8116fe8def
commit a448c0b81e
3 changed files with 23 additions and 0 deletions

View File

@@ -233,9 +233,13 @@ pub fn do_tx_transfers(
leader: &NodeInfo,
shared_tx_thread_count: &Arc<AtomicIsize>,
total_tx_sent_count: &Arc<AtomicUsize>,
thread_batch_sleep_ms: usize,
) {
let client = mk_client(&leader);
loop {
if thread_batch_sleep_ms > 0 {
sleep(Duration::from_millis(thread_batch_sleep_ms as u64));
}
let txs;
{
let mut shared_txs_wl = shared_txs.write().unwrap();