Skip to content

amjad489/random_data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

random_data

Python script to insert random data to MySql server to performance testing purpose.

script will create a table and insert random data into the table. By default it will insert 100000 rows.

This value can be easily override through passing --rows-1000 parameter.

Python dependencies

Setup

Install

Clone the git repo

git clone https://github.com/amjad489/random_data.git

Run the following command to install the required dependencies.

$ pip install -r requirements.txt

Run

Pass the following parameters to run the script.

$ python generate_data.py localhost root password random_data --rows=100000

Output

Help

$ python generate_data.py                                                 
usage: Script to insert random data to Mysql database. [-h] [--rows ROWS]
                                                       host username password
                                                       database

positional arguments:
  host         database hostname/ip
  username     database username
  password     database password
  database     database name to generate random data

optional arguments:
  -h, --help   show this help message and exit
  --rows ROWS  count of rows to be inserted to database.

About

Script to dump random data to MySql server

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages