Commit d44cd1d
committed
test(rate-limiter): baseline comparison and boundary burst empirical proof
- Add --baseline flag to compare_performance.py that measures no-rate-limit
plugin overhead, then reports per-implementation rate-limiter cost delta
- Convert xfail test_fixed_window_burst_at_boundary into passing test that
empirically proves fixed_window allows 2x limit at window boundaries
- Add companion test_sliding_window_prevents_boundary_burst proving
sliding_window blocks the same burst scenario
Resolves two previously deferred limitations:
- "Baseline / no-plugin overhead comparison"
- "Fixed-window boundary burst — documented but not empirically demonstrated"
Signed-off-by: Pratik Gandhi <gandhipratik203@gmail.com>1 parent 358a1c7 commit d44cd1d
2 files changed
Lines changed: 91 additions & 28 deletions
File tree
- plugins_rust/rate_limiter
- tests/unit/mcpgateway/plugins/plugins/rate_limiter
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
118 | 117 | | |
119 | 118 | | |
120 | 119 | | |
121 | 120 | | |
122 | | - | |
123 | | - | |
124 | | - | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
125 | 129 | | |
126 | 130 | | |
127 | 131 | | |
| |||
438 | 442 | | |
439 | 443 | | |
440 | 444 | | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
441 | 459 | | |
442 | 460 | | |
443 | 461 | | |
| |||
459 | 477 | | |
460 | 478 | | |
461 | 479 | | |
462 | | - | |
463 | | - | |
| 480 | + | |
| 481 | + | |
464 | 482 | | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
465 | 487 | | |
466 | 488 | | |
467 | 489 | | |
| |||
593 | 615 | | |
594 | 616 | | |
595 | 617 | | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
596 | 624 | | |
597 | 625 | | |
598 | 626 | | |
| |||
Lines changed: 57 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
773 | 773 | | |
774 | 774 | | |
775 | 775 | | |
776 | | - | |
777 | | - | |
778 | | - | |
779 | | - | |
780 | | - | |
781 | | - | |
782 | | - | |
783 | 776 | | |
784 | | - | |
785 | | - | |
786 | | - | |
787 | | - | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
788 | 782 | | |
789 | 783 | | |
790 | 784 | | |
791 | 785 | | |
792 | 786 | | |
793 | 787 | | |
794 | | - | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
795 | 791 | | |
796 | | - | |
797 | | - | |
798 | | - | |
799 | | - | |
800 | 792 | | |
801 | 793 | | |
802 | 794 | | |
| |||
821 | 813 | | |
822 | 814 | | |
823 | 815 | | |
824 | | - | |
825 | | - | |
826 | | - | |
827 | | - | |
828 | | - | |
829 | | - | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
830 | 865 | | |
831 | 866 | | |
832 | 867 | | |
| |||
0 commit comments