From 96f7aedd4ba85873f54f605a048e71fd0e0cd41a Mon Sep 17 00:00:00 2001 From: Studio Date: Fri, 27 Nov 2026 19:22:24 -0500 Subject: [PATCH] =?UTF-8?q?T-70:=20M1.2c=20=E2=80=94=20`tools/curate-etl`:?= =?UTF-8?q?=20pure=20`corporate=5Factions`=20builder=20(splits=20+=20divid?= =?UTF-8?q?ends=20+=20OTC=20continuation=20/=20Shumway=20terminal=20delist?= =?UTF-8?q?ing=20rows)=20with=20local=20benchmark=20(no=20new=20crates)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/curate-etl/src/bench.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/curate-etl/src/bench.rs b/tools/curate-etl/src/bench.rs index 1541d75e..b707fbc7 100644 --- a/tools/curate-etl/src/bench.rs +++ b/tools/curate-etl/src/bench.rs @@ -158,7 +158,7 @@ pub fn run_adj_benchmark(events: usize) -> Result { let mut dividends: Vec<(i32, DividendEvent)> = Vec::with_capacity(events); for _ in 0..events { - let key = (rng.next_u64() % (BENCH_KEY_COUNT as u64)) as i32 + 1; + let key = ((rng.next_u64() as usize) % BENCH_KEY_COUNT) as i32 + 1; let ex_date = min_date + (rng.next_u64() % date_span) as i32; let kind_roll = rng.next_u64() % 100; @@ -167,7 +167,7 @@ pub fn run_adj_benchmark(events: usize) -> Result { let ratio = if ratio_roll == 0 { 1.0 } else { - SAMPLE_RATIOS[(rng.next_u64() % (SAMPLE_RATIOS.len() as u64)) as usize] + SAMPLE_RATIOS[(rng.next_u64() as usize) % SAMPLE_RATIOS.len()] }; splits.push((key, SplitEvent { ex_date, ratio })); } else { @@ -283,7 +283,7 @@ pub fn run_corporate_actions_benchmark( let mut delistings: Vec<(i32, DelistingOutcomeEvent)> = Vec::with_capacity(events / 20); for _ in 0..events { - let key = (rng.next_u64() % (BENCH_KEY_COUNT as u64)) as i32 + 1; + let key = ((rng.next_u64() as usize) % BENCH_KEY_COUNT) as i32 + 1; let ex_date = min_date + (rng.next_u64() % date_span) as i32; let kind_roll = rng.next_u64() % 100; @@ -292,7 +292,7 @@ pub fn run_corporate_actions_benchmark( let ratio = if ratio_roll == 0 { 1.0 } else { - SAMPLE_RATIOS[(rng.next_u64() % (SAMPLE_RATIOS.len() as u64)) as usize] + SAMPLE_RATIOS[(rng.next_u64() as usize) % SAMPLE_RATIOS.len()] }; let decl_roll = rng.next_u64() % 100; let declared_date = if decl_roll < 30 {