GithubHelp home page GithubHelp logo

hamid-rd3 / qos_test_api Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 81 KB

qos measurement tool api

Home Page: http://185.130.78.174:5201/api/swagger/

License: MIT License

Python 95.81% Shell 4.19%
django-rest-framework drf-yasg python selenium-webdriver shell-scripting drf-spectacular

qos_test_api's Introduction


In this repo I create a REST API and implement some qos tests to measure quality of service parameters such as packet loss http responce jitter...

More about QoS parameters

more Information about Selenium and How To Measure Page Load Times :

" https://www.lambdatest.com/blog/how-to-measure-page-load-times-with-selenium/ "

"https://www.w3.org/TR/navigation-timing-2/#dfn-redirect-count"

How to use ping command to extract packet loss jitter and latency :

"https://linux.die.net/man/8/ping"

source code and a guide to ddosify :

"https://github.com/ddosify/ddosify"

How to use cURL and an Introduction to HTTP Transaction Timing :

" https://netbeez.net/blog/http-transaction-timing-breakdown-with-curl"

optimization api performance with the help of asyncio and multi-threading :

"https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.run_in_executor"

Beginner Installation

Create your virtual environment

"you may want to install python 3.8+ and pip package on linux kernel or WSL before starting Installation"

On Linux or WSL

pip install virtualenv
python3 -m venv .venv
source .venv/bin/activate 
#to ensure your environment activation you can check by :
which python

Install the requirement packeges

pip install -r requirements.txt
chmod +x install_required.sh
./install_required.sh

Add an admin user

Admin and create QoS objects

cd backend 
python manage.py makemigrations
python manage.py migrate
python manage.py createsuperuser
##Register with your desired username and password

Start server

#default port 8000 select another port if you want   
python manage.py runserver 8000

Launch the api

In here the goal is to simulate a client using the api

Open another bash :

#bash 2
source .venv/bin/activate
cd py_client
#Configure your qos input arguments in config.yaml
#login to your super-user account 
python create.py

you can open your browser to see the views

url patterns :

#http://localhost:8000/ +
1 admin/
2 api/
3 api/ auth/
4 api/ swagger-json/ [name='schema-json']
5 api/ swagger/ [name='schema-swagger-ui']
6 api/ redoc/ [name='schema-redoc']
7 api/ get-details
8 api/ api-register
9 api/products/ <int:pk>/
10 api/products/
11 api/products/ <int:pk>/update/
12 api/products/ <int:pk>/delete/

image

Swagger redoc

if server is running you can see the swagger redoc document below

" http://185.130.78.174:5201/api/redoc/ "

offline redoc document

QoS API Doc.pdf

Good Luck ๐Ÿ‘

qos_test_api's People

Contributors

hamid-rd3 avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

hamid-rd

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.