Skip to content

Commit

Permalink
fix: thread config
Browse files Browse the repository at this point in the history
  • Loading branch information
hopeyen committed Sep 10, 2024
1 parent 2817a9b commit eec4d41
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scripts/flood.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ async function simulateNetworkFlood(argv: any) {
console.log(`start sending transactions`)
// if throughput target is set, we will not respect the maxTxDataSize setting
if (argv.targetThroughput > 0) {
argv.threads = argv.max_thread
const avg_tx_size = argv.targetThroughput / argv.max_threads;
const avg_tx_size = argv.targetThroughput / argv.threads;
for (let i = 0; i < argv.rounds; i++) {
argv.from = `user_${randomInRange(argv.user_count)}`;
argv.to = `user_${randomInRange(argv.user_count)}`; // don't care if sending to self
Expand All @@ -79,7 +78,7 @@ async function simulateNetworkFlood(argv: any) {
for (let i = 0; i < argv.rounds; i++) {
argv.from = `user_${randomInRange(argv.user_count)}`;
argv.to = `user_${randomInRange(argv.user_count)}`; // don't care if sending to self
argv.threads = randomInRange(argv.max_thread)
argv.threads = randomInRange(argv.threads)
const size = randomInRange(argv.maxTxDataSize)
argv.data = generateRandomHexData(size);

Expand Down

0 comments on commit eec4d41

Please sign in to comment.