Skip to content

fix: implement fee distribution summary, IQR outliers, and analysis benchmarks#211

Merged
Tinna23 merged 2 commits into
StellarCommons:mainfrom
temiport25:fix/issues-151-152-153-154
Apr 25, 2026
Merged

fix: implement fee distribution summary, IQR outliers, and analysis benchmarks#211
Tinna23 merged 2 commits into
StellarCommons:mainfrom
temiport25:fix/issues-151-152-153-154

Conversation

@temiport25
Copy link
Copy Markdown
Contributor

Summary

Resolves four issues assigned to @temiport25 in the devkit/analysis package.

Changes

#151 — Fee distribution summary (percentile.rs)

  • Added FeeDistributionSummary struct with min, max, mean, median, std_dev, and percentiles (p10–p99)
  • Added Percentile::fee_distribution_summary(sorted: &[u64]) -> Option<FeeDistributionSummary>

#152 — IQR outlier detection (spike_classifier.rs)

  • Added SpikeClassifier::iqr_outliers(fees: &[u64]) -> Vec<usize>
  • Flags indices of fees outside Q1 − 1.5×IQR or Q3 + 1.5×IQR

#153 — Percentile benchmark (benches/percentile_bench.rs)

  • Benchmarks nearest_rank, linear_interpolation, and fee_distribution_summary on 1,000,000 samples

#154 — Rolling window benchmark (benches/rolling_window_bench.rs)

  • Implemented RollingWindow::sma, ema, wma in rolling_window.rs
  • Benchmarks all three algorithms on 100,000 samples

Closes

Closes #151
Closes #152
Closes #153
Closes #154

…mmons#153, StellarCommons#154

- StellarCommons#151: Add FeeDistributionSummary struct and fee_distribution_summary()
  to percentile.rs returning min/max/mean/median/std_dev/p10-p99
- StellarCommons#152: Add iqr_outliers() to spike_classifier.rs flagging fees outside
  1.5x IQR as outlier indices
- StellarCommons#153: Add benches/percentile_bench.rs benchmarking nearest_rank,
  linear_interpolation, and fee_distribution_summary on 1M samples
- StellarCommons#154: Add benches/rolling_window_bench.rs benchmarking SMA/EMA/WMA
  on 100k samples; implement SMA/EMA/WMA in rolling_window.rs
- Update Cargo.toml to register percentile_bench and rolling_window_bench
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Apr 25, 2026

@temiport25 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Tinna23 Tinna23 merged commit 19d9cdb into StellarCommons:main Apr 25, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants