Evaluation reportGenerated by the project's CI evaluation on held-out data.About the projectCode on GitHub

Pricing Rules for WooCommerce: evaluation

20,000 random carts against random rule sets of every type: sales, bulk tiers, buy-X-get-Y and cart thresholds, with priorities, scopes, roles, schedules, exclusivity and discount caps.

0of 20,000 carts differ from the independent reference
10/10planted bugs caught by that comparison
29% → 0cart discounts a cent off: rounding each line vs largest remainder
2.58 msp95 for 50 lines × 1,000 units and 20 rules

Gate: 8 / 8

Checkvaluetarget
Carts where the engine differs from the independent reference0 / 20000= 0✓ pass
Planted bugs caught by that comparison10 / 10= all✓ pass
Items priced below their floor or below zero0= 0✓ pass
Carts whose lines do not add up to the total0= 0✓ pass
Carts whose per-rule savings do not add up0= 0✓ pass
Cart discounts off by a cent or more0 / 5000= 0✓ pass
Negative prices from stacked percentages0 / 5000= 0✓ pass
p95 time, 50 lines × 1,000 units, 20 rules2.58 ms≤ 25 ms✓ pass

Planted bugs

  • ✓ round down instead of half up
  • ✓ BOGO discounts the dearest unit
  • ✓ BOGO ignores the group limit
  • ✓ floor not enforced
  • ✓ exclusive does not lock
  • ✓ cart leftover cents dropped
  • ✓ cart threshold uses >
  • ✓ bulk counts all lines together
  • ✓ priority order reversed
  • ✓ rule end date inclusive

Common shortcuts

Shortcutcarts affectedthis engine
Cart discount spread by rounding each line29%0
Percentages stacked by adding (price below zero)49.1%0

Speed with 20 rules: engine (buckets of identical units) vs unit-by-unit reference, median

Cartunitsenginereference
5 lines × 315 0.124 ms 0.21 ms
20 lines × 10200 0.436 ms 2.92 ms
50 lines × 100050,000 1.566 ms 1845.59 ms