I want to test a proxy [gateway] service. What would be the simplest script to check the proxy’s IP speed and  performance? See the following script.

This script runs in a loop, iterating over url(s) or rotating proxy value if needed. The script accumulates total url visits (total_visits) and also tallies the various exceptions (Timeout, TooManyRedirects and Request exceptions) into corresponding variables.

Note: only Request Exceptions are caused by a proxy server. The other kinds of exceptions are website (resource) specific: Timeout and TooManyRedirects exceptions.
For calculating the performance of a proxy server, I do the following:

Thus I get a proxy server performance value (in most cases close to 100%).

Proxy services test

Here I want to share my testing results of different proxy services.

Rotating IPSticky IP
Speed avg., seconds Performance, %Speed avg., seconds Performance, %
Smartproxy2.3993.590Sep. 2019

Test conditions

  • The test has been conducted for over 1000 requests.
  • Request timeout is 30 seconds.
  • The proxy speed was calculated based on the avg. access time to the web page (https://ipinfo.io) with proxy and the avg. access time without proxy:
    speed = avg_load_time_with_proxy - avg_load_time_without_proxy