Best Test Request

A simple benchmark to determine the best request function when testing (or at least the fastest one).

View the source code

This page was last updated at 2024-09-01T01:56

Each variant was benchmarked using a suite of 100 tests, with each test sending 50 requests.

| Server | Tester | Duration | | ========================= | ============================== | ========: | | Flask jsonify | Pytest real request get | 11.842 | | Flask jsonify | Pytest real request post | 11.540 | | Flask jsonify | Jest fetch get | 8.937 | | Flask jsonify | Jest sync request get | 30.682 | | Flask jsonify | Jest fetch post | 8.788 | | Flask jsonify | Jest sync request post | 31.185 | | Flask jsonify | Jest sync request curl get | 5.929 | | Flask jsonify | Jest sync request curl post | 5.979 | | Flask json lib | Pytest real request get | 11.340 | | Flask json lib | Pytest real request post | 11.490 | | Flask json lib | Jest fetch get | 8.285 | | Flask json lib | Jest sync request get | 31.137 | | Flask json lib | Jest fetch post | 8.635 | | Flask json lib | Jest sync request post | 31.134 | | Flask json lib | Jest sync request curl get | 5.929 | | Flask json lib | Jest sync request curl post | 6.029 | | Express | Pytest real request get | 10.191 | | Express | Pytest real request post | 10.288 | | Express | Jest fetch get | 4.829 | | Express | Jest sync request get | 29.386 | | Express | Jest fetch post | 5.429 | | Express | Jest sync request post | 29.495 | | Express | Jest sync request curl get | 4.529 | | Express | Jest sync request curl post | 4.728 | | Flask jsonify | Pytest flask testing | 2.573 | | Flask json lib | Pytest flask testing | 2.572 | | Express | Jest light my request | 3.324 |