-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
packages/orchestration/test/examples/quickSend-perf.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/** | ||
* advance parameters: | ||
rate of new requests per block | ||
distribution of requests over unique addresses (uniform vs. power-law(b)) | ||
delay, in blocks, between CCTP request and noble mint (for settlement) | ||
background work, unrelated to Fast USDC | ||
probably assume 0, at least initially | ||
 | ||
 | ||
 | ||
 | ||
 | ||
NEW | ||
 | ||
1:49 | ||
resulting measurements: | ||
maximum sustainable load at steady state | ||
#blocks to recover from unsustainably high load | ||
*/ | ||
|
||
const runSim = async ({ fanout, mintDelay }) => { | ||
let maxSustainable; | ||
|
||
// TODO: mintDelay | ||
for (let rate = 1; ; rate += 1) { | ||
const something = scheduleReports(rate, fanout); | ||
scheduleMints(something); | ||
const policy = computronCounter(); // see line 266 of launch-chain.js | ||
const leftover = controller.run(); // runKernel / handleNextBlock | ||
if (leftover.length > 0) { | ||
maxSustainable = rate; | ||
break; | ||
} | ||
} | ||
|
||
return { maxSustainable, recoveryBlocks }; | ||
}; |