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-10-01T01:58

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.786 | | Flask jsonify | Pytest real request post | 11.688 | | Flask jsonify | Jest fetch get | 8.588 | | Flask jsonify | Jest sync request get | 23.313 | | Flask jsonify | Jest fetch post | 8.839 | | Flask jsonify | Jest sync request post | 24.218 | | Flask jsonify | Jest sync request curl get | 5.977 | | Flask jsonify | Jest sync request curl post | 6.178 | | Flask json lib | Pytest real request get | 11.437 | | Flask json lib | Pytest real request post | 12.088 | | Flask json lib | Jest fetch get | 8.334 | | Flask json lib | Jest sync request get | 23.664 | | Flask json lib | Jest fetch post | 8.636 | | Flask json lib | Jest sync request post | 23.916 | | Flask json lib | Jest sync request curl get | 5.928 | | Flask json lib | Jest sync request curl post | 6.078 | | Express | Pytest real request get | 10.438 | | Express | Pytest real request post | 10.342 | | Express | Jest fetch get | 4.884 | | Express | Jest sync request get | 21.866 | | Express | Jest fetch post | 5.535 | | Express | Jest sync request post | 22.421 | | Express | Jest sync request curl get | 4.529 | | Express | Jest sync request curl post | 4.627 | | Flask jsonify | Pytest flask testing | 2.621 | | Flask json lib | Pytest flask testing | 2.621 | | Express | Jest light my request | 3.277 |