8000 GitHub - gedom2012/dbchaos: Stress-test your database with pre-defined queries. Validate slow and expensive queries that breaks your database.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Stress-test your database with pre-defined queries. Validate slow and expensive queries that breaks your database.

License

Notifications You must be signed in to change notification settings

gedom2012/dbchaos

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DBChaos

Stress-test your database with pre-defined queries. Validate slow and expensive queries that breaks your database.

Installation

go install github.com/adaptive-scale/dbchaos@v0.4.1

Run your first test

Create a file name config.yaml with the following content:

dbType: postgres
connection: "host=localhost port=5432 user=postgres password=postgres dbname=postgres sslmode=disable"
query: |
  SELECT pg_database.datname as "Database", pg_size_pretty(pg_database_size(pg_database.datname)) as "Size"
  FROM pg_database;
parallelRuns: 100
runFor: 30m

To run the above config file:

dbchaos runTest 

Run bunch of queries in parallel

Create a file called scenario.yaml with the following content:

dbType: mysql
connection: "root:root@tcp(host:port)/db"
scenarios:
  - query: select * from information_schema.statistics
    parallelRuns: 10000
    runFor: 15m
  - query: |
      SELECT table_schema "Database", ROUND(SUM(data_length + index_length) / 1024 / 1024, 2) "Size (MB)"
      FROM information_schema.tables
      GROUP BY table_schema;
    parallelRuns: 10000
    runFor: 15m

To run the above scenario file:

dbchaos runScenario 

About

Stress-test your database with pre-defined queries. Validate slow and expensive queries that breaks your database.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%
0