Code Monkey home page Code Monkey logo

mysql-benchmark-tool's Introduction

MySQL Benchmark Tool

MySQL Benchmark Tool is a lightweight commandline tool for repeatedly executing SQL-Statements from a previously written MySQL-Log.

Download

You can find precompiled jars in the bin folder: https://github.com/qaware/mysql-benchmark-tool/tree/master/bin

What it does and how to use it

There's a blog post with more detailed explanation at: http://qaware.blogspot.de/2014/12/sql-benchmarking-tool-for-java.html

Here's a small abstract:

This article describes a simple java tool for recording and replaying MySQL queries while measuring their execution times. The replay mechanism makes the measurements comparable across different environments.

Why do we need another benchmarking tool? What's so special about this one?

  • It's capable of reading and replaying MySQL's 'general query logs', not 'slow query logs' and not tcpdumps. Percona Playback in version 0.3 doesn't supports 'general query logs'.
  • It's measuring execution times of all queries and aggregating identical executions. pt-query-digest supports general query log, but only without measuring execution times.
  • It's written in pure Java, making it the most realistic way of running queries against the server if you're developing a Java application.
  • It's small and easy to use, not a full blown full featured benchmarking suite.
  • It does not offer advanced filtering methods, just restriction to connection ids and prefix matchings.
  • Measurements can be exported in either CSV for easy Excel import or in JETM-Style.

Usage

Usage: MySQL Benckmark Tool [options]
  Options:
    -db
       The database name. eg.: -db test_db
       Default: test_db
    -f
       The result can be in default JETM style or CSV. JETM is default.
       Default: JETM
    -help, -h
       Execute mysql query benchmark based on mysql logs
       Default: false
    -id
       Only execute queries from the log with this connection id. This parameter
       is optional.
    -ignore
       Ignore statements which start with these prefixes, case insensitive.
       Enter a comma separated list of prefixes.
       Default: []
    -log
       Location of the logfile which contains the mysql queries to execute
       Default: benchmarking-queries.sql
    -o
       Location of the output file to write the results to
       Default: results.txt
  * -p
       mysql password
    -s
       The connection string to the mysql server (without database name). eg.:
       -c jdbc:mysql://localhost:3306/
       Default: jdbc:mysql://localhost:3306/
  * -u
       mysql username
    -verbose, -v
       Print all results to console
       Default: false

mysql-benchmark-tool's People

Contributors

fuchshuber avatar qa-felix-kelm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mysql-benchmark-tool's Issues

benchmarking-queries.sql is missing but not mentioned in readme

First of all, your tool seems to be really useful, but when I tried to run it I got the following error:

[main] ERROR de.qaware.mysqlbenchmark.Main - File not found.
java.io.FileNotFoundException: benchmarking-queries.sql (Das System kann die ang
egebene Datei nicht finden)
        at java.io.FileInputStream.open0(Native Method)
        at java.io.FileInputStream.open(Unknown Source)
        at java.io.FileInputStream.<init>(Unknown Source)
        at java.io.FileInputStream.<init>(Unknown Source)
        at java.io.FileReader.<init>(Unknown Source)
        at de.qaware.mysqlbenchmark.logfile.QueryParser.parseLogFile(QueryParser
.java:82)
        at de.qaware.mysqlbenchmark.Main.main(Main.java:75)

Unfortunately, there is nothing documented about this file.

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.