๐บ๐ธ English ย ย ย |ย ย ย ๐จ๐ณ ไธญๆ
๐ฆ Code Changes: View Diff
Core Objective: To establish a quantifiable, traceable, and comparable performance baseline.
Building on the testing framework from 0x07-a, this chapter adds detailed performance metric collection and analysis capabilities.
Optimization without a baseline is blind:
- Premature Optimization: Optimizing code that accounts for 1% of runtime.
- Delayed Regression Detection: A refactor drops performance by 50%, but it's only discovered 3 months later.
- Unquantifiable Improvement: Promoting "it's much faster," but exactly how much?
With a baseline, you can:
- Verify before Commit: Ensure performance hasn't degraded.
- Pinpoint Bottlenecks: Identify which component consumes the most time.
- Quantify Optimization: "Throughput increased from 30K ops/s to 100K ops/s."
| Metric | Explanation | Calculation |
|---|---|---|
throughput_ops |
Order Throughput | orders / exec_time |
throughput_tps |
Trade Throughput | trades / exec_time |
We decompose execution time into four components:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Order Processing (per order) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 1. Balance Check โ Account lookup + balance validation โ
โ - Account lookup โ FxHashMap O(1) โ
โ - Fund locking โ Check avail >= required, then lock โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 2. Matching Engine โ book.add_order() โ
โ - Price lookup โ BTreeMap O(log n) โ
โ - Order matching โ iterate + partial fill โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 3. Settlement โ settle_as_buyer/seller โ
โ - Balance update โ HashMap O(1) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 4. Ledger I/O โ write_entry() โ
โ - File write โ Disk I/O โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Sample total processing latency every N orders:
| Percentile | Meaning |
|---|---|
| P50 | Median, typical case |
| P99 | 99% of requests are faster than this |
| P99.9 | Tail latency, worst cases |
| Max | Maximum latency |
- Hardware: MacBook Pro M Series
- Data: 100,000 Orders, 47,886 Trades
- Mode: Release build (
--release)
Throughput: ~29,000 orders/sec | ~14,000 trades/sec
Execution Time: ~3.5s
=== Performance Breakdown ===
Balance Check: 17.68ms ( 0.5%) โ FxHashMap O(1)
Matching Engine: 36.04ms ( 1.0%) โ Extremely Fast!
Settlement: 4.77ms ( 0.1%) โ Negligible
Ledger I/O: 3678.68ms ( 98.4%) โ Bottleneck!
Key Findings:
- Ledger I/O consumes 98.4% of time.
- Balance Check + Matching + Settlement total only ~58ms.
- Theoretical Limit: ~1.7 Million orders/sec (without I/O).
Order Lifecycle
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ Balance โ โ Matching โ โ Settlement โ โ Ledger โ
โ Check โโโโโถโ Engine โโโโโถโ (Balance) โโโโโถโ I/O โ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ โ โ โ
โผ โผ โผ โผ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ FxHashMap โ โ BTreeMap โ โVec<Balance> โ โ File:: โ
โ +Vec O(1) โ โ O(log n) โ โ O(1) โ โ write() โ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Total Time: 17.68ms 36.04ms 4.77ms 3678.68ms
Percentage: 0.5% 1.0% 0.1% 98.4%
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Per-Order: 0.18ยตs 0.36ยตs 0.05ยตs 36.79ยตs
Potential: 5.6M ops/s 2.8M ops/s 20M ops/s 27K ops/s
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Business Logic ~58ms (1.6%) I/O ~3679ms (98.4%)
โโโโโโโโโโโโโโโโโโโโโโโโโโโถ โโโโโโโโโโโโโโโโโโโโโโโโโถ
Fast โ
Bottleneck ๐ด
Analysis:
| Phase | Latency/Order | Theoretical OPS | Note |
|---|---|---|---|
| Balance Check | 0.18ยตs | 5.6M/s | FxHashMap Lookup + Vec O(1) |
| Matching Engine | 0.36ยตs | 2.8M/s | BTreeMap Price Matching |
| Settlement | 0.05ยตs | 20M/s | Vec<Balance> O(1) Indexing |
| Ledger I/O | 36.79ยตs | 27K/s | Unbuffered File Write = Bottleneck! |
E2E Result:
- Actual Throughput: ~29K orders/sec (I/O Bound)
- Theoretical Limit (No I/O): ~1.7M orders/sec (60x room for improvement!)
=== Latency Percentiles (sampled) ===
Min: 125 ns
Avg: 34022 ns
P50: 583 ns โ Typical order < 1ยตs
P99: 391750 ns โ 99% of orders < 0.4ms
P99.9: 1243833 ns โ Tail latency ~1.2ms
Max: 3207875 ns โ Worst case ~3ms
# Performance Baseline - 0xInfinity
# Generated: 2025-12-16
orders=100000
trades=47886
exec_time_ms=3451.78
throughput_ops=28971
throughput_tps=13873
matching_ns=32739014
settlement_ns=3085409
ledger_ns=3388134698
latency_min_ns=125
latency_avg_ns=34022
latency_p50_ns=583
latency_p99_ns=391750
latency_p999_ns=1243833
latency_max_ns=3207875
Contains full execution summary and performance breakdown.
/// Performance metrics for execution analysis
#[derive(Default)]
struct PerfMetrics {
// Timing breakdown (nanoseconds)
total_balance_check_ns: u64, // Account lookup + balance check + lock
total_matching_ns: u64, // OrderBook.add_order()
total_settlement_ns: u64, // Balance updates after trade
total_ledger_ns: u64, // Ledger file I/O
// Per-order latency samples
latency_samples: Vec<u64>,
sample_rate: usize,
}
impl PerfMetrics {
fn new(sample_rate: usize) -> Self { ... }
fn add_order_latency(&mut self, latency_ns: u64) { ... }
fn add_balance_check_time(&mut self, ns: u64) { ... }
fn add_matching_time(&mut self, ns: u64) { ... }
fn add_settlement_time(&mut self, ns: u64) { ... }
fn add_ledger_time(&mut self, ns: u64) { ... }
fn percentile(&self, p: f64) -> Option<u64> { ... }
fn min_latency(&self) -> Option<u64> { ... }
fn max_latency(&self) -> Option<u64> { ... }
fn avg_latency(&self) -> Option<u64> { ... }
}Based on baseline data, future directions:
| Optimization | Expected Gain | Difficulty |
|---|---|---|
| Use BufWriter | 10-50x I/O | Low |
| Batch Write | 2-5x | Low |
| Optimization | Expected Gain | Difficulty |
|---|---|---|
| Async I/O | Decouple Matching & Persistence | Medium |
| Memory Pool | Reduce Allocation | Medium |
| Optimization | Expected Gain | Difficulty |
|---|---|---|
| DPDK/io_uring | 10x+ | High |
| FPGA | 100x+ | Extreme |
# Run and generate performance data
cargo run --release
# Update baseline (when code changes)
cargo run --release -- --baseline
# View performance data
cat output/t2_perf.txt
# Compare performance changes
python3 scripts/compare_perf.pyโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Performance Comparison Report โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Metric Baseline Current Change
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Orders 100000 100000 -
Trades 47886 47886 -
Exec Time 3753.87ms 3484.37ms -7.2%
Throughput (orders) 26639/s 28700/s +7.7%
Throughput (trades) 12756/s 13743/s +7.7%
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Timing Breakdown (lower is better):
Metric Baseline Current Change OPS
Balance Check 17.68ms 16.51ms -6.6% 6.1M
Matching Engine 36.04ms 35.01ms -2.8% 2.9M
Settlement 4.77ms 5.22ms +9.4% 19.2M
Ledger I/O 3678.68ms 3411.49ms -7.3% 29K
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Latency Percentiles (lower is better):
Metric Baseline Current Change
Latency MIN 125ns 125ns +0.0%
Latency AVG 37.9ยตs 34.8ยตs -8.2%
Latency P50 584ns 541ns -7.4%
Latency P99 420.2ยตs 398.9ยตs -5.1%
Latency P99.9 1.63ms 1.24ms -24.3%
Latency MAX 9.76ms 3.53ms -63.9%
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
No significant regressions detected
This chapter accomplished:
- PerfMetrics Structure: Collecting time breakdown & latency samples.
- Time Breakdown: Balance Check / Matching / Settlement / Ledger I/O.
- Latency Percentiles: P50 / P99 / P99.9 / Max.
- t2_perf.txt: Machine-readable baseline file.
- compare_perf.py: Tool to detect regression.
- Key Finding: Ledger I/O takes 98.4%, major bottleneck.
๐ฆ ไปฃ็ ๅๆด: ๆฅ็ Diff
ๆ ธๅฟ็ฎ็๏ผๅปบ็ซๅฏ้ๅใๅฏ่ฟฝ่ธชใๅฏๆฏ่พ็ๆง่ฝๅบ็บฟใ
ๆฌ็ซ ๅจ 0x07-a ๆต่ฏๆกๆถๅบ็กไธ๏ผๆทปๅ ่ฏฆ็ป็ๆง่ฝๆๆ ๆถ้ๅๅๆ่ฝๅใ
ๆฒกๆๅบ็บฟ็ไผๅๆฏ็ฒ็ฎ็๏ผ
- ่ฟๆฉไผๅ๏ผไผๅไบๅ 1% ๆถ้ด็ไปฃ็
- ๅๅฝๅ็ฐๅปถ่ฟ๏ผๆๆฌก้ๆๅฏผ่ดๆง่ฝไธ้ 50%๏ผไฝ 3 ไธชๆๅๆๅ็ฐ
- ๆ ๆณ้ๅๆน่ฟ๏ผ่ฏด"ๅฟซไบๅพๅค"๏ผไฝๅ ทไฝๅฟซไบๅคๅฐ๏ผ
ๆไบๅบ็บฟ๏ผไฝ ๅฏไปฅ๏ผ
- ๆฏๆฌกๆไบคๅ้ช่ฏ๏ผๆง่ฝๆฒกๆไธ้
- ็ฒพ็กฎๅฎไฝ็ถ้ข๏ผๅชไธช็ปไปถๆถ่ๆๅคๆถ้ด
- ้ๅไผๅๆๆ๏ผไป 30K ops/s ๆๅๅฐ 100K ops/s
| ๆๆ | ่ฏดๆ | ่ฎก็ฎๆนๅผ |
|---|---|---|
throughput_ops |
่ฎขๅๅๅ้ | orders / exec_time |
throughput_tps |
ๆไบคๅๅ้ | trades / exec_time |
ๆไปฌๅฐๆง่กๆถ้ดๅ่งฃไธบๅไธช็ปไปถ๏ผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Order Processing (per order) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 1. Balance Check โ Account lookup + balance validation โ
โ - Account lookup โ FxHashMap O(1) โ
โ - Fund locking โ Check avail >= required, then lock โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 2. Matching Engine โ book.add_order() โ
โ - Price lookup โ BTreeMap O(log n) โ
โ - Order matching โ iterate + partial fill โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 3. Settlement โ settle_as_buyer/seller โ
โ - Balance update โ HashMap O(1) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 4. Ledger I/O โ write_entry() โ
โ - File write โ Disk I/O โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
้ๆ ทๆฏ N ไธช่ฎขๅ็ๆปๅค็ๅปถ่ฟ๏ผ่ฎก็ฎ๏ผ
| ็พๅไฝๆฐ | ๅซไน |
|---|---|
| P50 | ไธญไฝๆฐ๏ผๅ ธๅๆ ๅต |
| P99 | 99% ็่ฏทๆฑไฝไบๆญคๅผ |
| P99.9 | ๅฐพๅปถ่ฟ๏ผๆๅๆ ๅต |
| Max | ๆๅคงๅปถ่ฟ |
- ็กฌไปถ๏ผMacBook Pro M ็ณปๅ
- ๆฐๆฎ๏ผ100,000 ่ฎขๅ๏ผ47,886 ๆไบค
- ๆจกๅผ๏ผRelease build (
--release)
Throughput: ~29,000 orders/sec | ~14,000 trades/sec
Execution Time: ~3.5s
=== Performance Breakdown ===
Balance Check: 17.68ms ( 0.5%) โ FxHashMap O(1)
Matching Engine: 36.04ms ( 1.0%) โ ๆๅฟซ๏ผ
Settlement: 4.77ms ( 0.1%) โ ๅ ไนๅฏๅฟฝ็ฅ
Ledger I/O: 3678.68ms ( 98.4%) โ ็ถ้ข๏ผ
ๅ ณ้ฎๅ็ฐ๏ผ
- Ledger I/O ๅ ็จ 98.4% ็ๆถ้ด
- Balance Check + Matching + Settlement ๆปๅ ฑๅช้ ~58ms
- ็่ฎบไธ้๏ผ~170 ไธ orders/sec๏ผๅฆๆๆฒกๆ I/O๏ผ
่ฎขๅ็ๅฝๅจๆ (Order Lifecycle)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ Balance โ โ Matching โ โ Settlement โ โ Ledger โ
โ Check โโโโโถโ Engine โโโโโถโ (Balance) โโโโโถโ I/O โ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ โ โ โ
โผ โผ โผ โผ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ FxHashMap โ โ BTreeMap โ โVec<Balance> โ โ File:: โ
โ +Vec O(1) โ โ O(log n) โ โ O(1) โ โ write() โ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Total Time: 17.68ms 36.04ms 4.77ms 3678.68ms
Percentage: 0.5% 1.0% 0.1% 98.4%
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Per-Order: 0.18ยตs 0.36ยตs 0.05ยตs 36.79ยตs
Potential: 5.6M ops/s 2.8M ops/s 20M ops/s 27K ops/s
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
ไธๅก้ป่พ ~58ms (1.6%) I/O ~3679ms (98.4%)
โโโโโโโโโโโโโโโโโโโโโโโโโโโถ โโโโโโโโโโโโโโโโโโโโโโโโโถ
ๆๅฟซ โ
็ถ้ข ๐ด
ๆง่ฝๅๆ:
| ้ถๆฎต | ๆฏ่ฎขๅๅปถ่ฟ | ็่ฎบ OPS | ่ฏดๆ |
|---|---|---|---|
| Balance Check | 0.18ยตs | 5.6M/s | FxHashMap ่ดฆๆทๆฅๆพ + Vec O(1) ไฝ้ข็ดขๅผ |
| Matching Engine | 0.36ยตs | 2.8M/s | BTreeMap ไปทๆ ผๅน้ |
| Settlement | 0.05ยตs | 20M/s | Vec<Balance> O(1) ็ดๆฅ็ดขๅผ |
| Ledger I/O | 36.79ยตs | 27K/s | unbuffered ๆไปถๅๅ ฅ = ็ถ้ข๏ผ |
E2E ็ปๆ:
- ๅฎ้ ๅๅ้: ~29K orders/sec (ๅ้ไบ Ledger I/O)
- ็่ฎบไธ้ (ๆ I/O): ~1.7M orders/sec (60x ๆๅ็ฉบ้ด!)
=== Latency Percentiles (sampled) ===
Min: 125 ns
Avg: 34022 ns
P50: 583 ns โ ๅ
ธๅ่ฎขๅ < 1ยตs
P99: 391750 ns โ 99% ็่ฎขๅ < 0.4ms
P99.9: 1243833 ns โ ๅฐพๅปถ่ฟ ~1.2ms
Max: 3207875 ns โ ๆๅ ~3ms
# Performance Baseline - 0xInfinity
# Generated: 2025-12-16
orders=100000
trades=47886
exec_time_ms=3451.78
throughput_ops=28971
throughput_tps=13873
matching_ns=32739014
settlement_ns=3085409
ledger_ns=3388134698
latency_min_ns=125
latency_avg_ns=34022
latency_p50_ns=583
latency_p99_ns=391750
latency_p999_ns=1243833
latency_max_ns=3207875
ๅ ๅซๅฎๆด็ๆง่กๆ่ฆๅๆง่ฝๅ่งฃใ
/// Performance metrics for execution analysis
#[derive(Default)]
struct PerfMetrics {
// Timing breakdown (nanoseconds)
total_balance_check_ns: u64, // Account lookup + balance check + lock
total_matching_ns: u64, // OrderBook.add_order()
total_settlement_ns: u64, // Balance updates after trade
total_ledger_ns: u64, // Ledger file I/O
// Per-order latency samples
latency_samples: Vec<u64>,
sample_rate: usize,
}
impl PerfMetrics {
fn new(sample_rate: usize) -> Self { ... }
fn add_order_latency(&mut self, latency_ns: u64) { ... }
fn add_balance_check_time(&mut self, ns: u64) { ... }
fn add_matching_time(&mut self, ns: u64) { ... }
fn add_settlement_time(&mut self, ns: u64) { ... }
fn add_ledger_time(&mut self, ns: u64) { ... }
fn percentile(&self, p: f64) -> Option<u64> { ... }
fn min_latency(&self) -> Option<u64> { ... }
fn max_latency(&self) -> Option<u64> { ... }
fn avg_latency(&self) -> Option<u64> { ... }
}ๅบไบๅบ็บฟๆฐๆฎ๏ผๅ็ปญไผๅๆนๅ๏ผ
| ไผๅ็น | ้ขๆๆๅ | ้พๅบฆ |
|---|---|---|
| ไฝฟ็จ BufWriter | 10-50x I/O | ไฝ |
| ๆน้ๅๅ ฅ | 2-5x | ไฝ |
| ไผๅ็น | ้ขๆๆๅ | ้พๅบฆ |
|---|---|---|
| ๅผๆญฅ I/O | ่งฃ่ฆๆฎๅๅๆไน ๅ | ไธญ |
| ๅ ๅญๆฑ | ๅๅฐๅ้ | ไธญ |
| ไผๅ็น | ้ขๆๆๅ | ้พๅบฆ |
|---|---|---|
| DPDK/io_uring | 10x+ | ้ซ |
| FPGA | 100x+ | ๆ้ซ |
# ่ฟ่กๅนถ็ๆๆง่ฝๆฐๆฎ
cargo run --release
# ๆดๆฐๅบ็บฟ๏ผๅฝไปฃ็ ๅๅๆถ๏ผ
cargo run --release -- --baseline
# ๆฅ็ๆง่ฝๆฐๆฎ
cat output/t2_perf.txt
# ๅฏนๆฏๆง่ฝๅๅ
python3 scripts/compare_perf.pyโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Performance Comparison Report โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Metric Baseline Current Change
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Orders 100000 100000 -
Trades 47886 47886 -
Exec Time 3753.87ms 3484.37ms -7.2%
Throughput (orders) 26639/s 28700/s +7.7%
Throughput (trades) 12756/s 13743/s +7.7%
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Timing Breakdown (lower is better):
Metric Baseline Current Change OPS
Balance Check 17.68ms 16.51ms -6.6% 6.1M
Matching Engine 36.04ms 35.01ms -2.8% 2.9M
Settlement 4.77ms 5.22ms +9.4% 19.2M
Ledger I/O 3678.68ms 3411.49ms -7.3% 29K
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Latency Percentiles (lower is better):
Metric Baseline Current Change
Latency MIN 125ns 125ns +0.0%
Latency AVG 37.9ยตs 34.8ยตs -8.2%
Latency P50 584ns 541ns -7.4%
Latency P99 420.2ยตs 398.9ยตs -5.1%
Latency P99.9 1.63ms 1.24ms -24.3%
Latency MAX 9.76ms 3.53ms -63.9%
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
No significant regressions detected
ๆฌ็ซ ๅฎๆไบไปฅไธๅทฅไฝ๏ผ
- PerfMetrics ็ปๆ๏ผๆถ้ๆถ้ดๅ่งฃๅๅปถ่ฟๆ ทๆฌ
- ๆถ้ดๅ่งฃ๏ผBalance Check / Matching / Settlement / Ledger I/O
- ๅปถ่ฟ็พๅไฝๆฐ๏ผP50 / P99 / P99.9 / Max
- t2_perf.txt๏ผๆบๅจๅฏ่ฏป็ๆง่ฝๅบ็บฟๆไปถ
- compare_perf.py๏ผๅฏนๆฏๅทฅๅ ท๏ผๆฃๆตๆง่ฝๅๅฝ
- ๅ ณ้ฎๅ็ฐ๏ผLedger I/O ๅ 98.4%๏ผๆฏไธป่ฆ็ถ้ข