Code Monkey home page Code Monkey logo

performance-test's Introduction

Performance test

This tool can do requests with provided proxies and store results to mysql database.

Installation

Create mysql database in your mysql database::

 mysql -u <username> -p <database> < performance_stats.sql

Create python virtual environment and install requirements::

$ cd performance-test
$ python3.8 -m venv venv
$ venv/bin/pip install -r requirements.txt

Config

MySQL credentials and target can be set in configuration file::

BASIC_CONFIG = {
    'mysql': {
        'host': 'localhost',
        'port': 3306,
        'db': 'your_database_name',
        'table': 'performance_test',
        'user': 'your_username',
        'password': 'your_password',
    },
    "target": "https://www.cloudflare.com/cdn-cgi/trace",
}

A good target to use is "https://www.cloudflare.com/cdn-cgi/trace", as it provides unbiased results.

API

$ venv/bin/python -m performance_test --help                                                                                      
Usage: __main__.py [OPTIONS]

Options:
  --config_path TEXT         Path to config. Default: 'config.py'.  [required]
  --proxies_file TEXT        Path to proxies file. Default: 'proxies.txt'.
                             Each proxy must be separated with a new line and
                             formatted in http format.  [required]

  --provider_name TEXT       Name of the proxy provider.  [required]
  --test_time INTEGER        Test time in seconds.  [required]
  --requests_number INTEGER  How many requests to do in 'test_time' time
                             period.  [required]

  --help                     Show this message and exit.

Run performance test

$ venv/bin/python -m performance_test --config_path config.py \                                                                   
> --proxies_file proxies.txt \
> --provider_name test_provider \
> --test_time 30 \
> --requests_number 30 \

Results

Results are stored into mysql database using credentials from configuration file.

alt text

performance-test's People

Contributors

proxyway-testing avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.