Skip to content

laysakura/sqlite3_benchmark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What’s this?

http://github.com/laysakura/sqlite3_benchmark/raw/master/doc/results-vacuum.png

This repository is a template for SQLite benchmark with any SQL. You can evaluate many queries at the same time with various parameters like different database files or whether to drop page cache.

Features

  • Template system: You can make many benchmark environments using this repository as a template. You can use installation tool to make an environment quickly.
  • Graph: It’s easy to get various graphs. You can set graph-parameter and plot-parameter to specify parameters to split graphs or plots.
  • Easy configuration: You can write experimental environments, SQLs, and parameters as you like. Only you have to do is to modify these 3 files.
    • python/SQL.py
    • python/Config.py
    • make/Makefile
  • Powerful SQL description: SQLs to evaluate should be written in Python string object. You can use convenient predefined function to get many SQLs at a time. See the example below:
    Util.get_str_allpairs(
        "SELECT COUNT (*) FROM '%s' WHERE junk = %d;",
        [["INBOX", "Trash", "Draft"], [0, 1]]
    )
    # Results in:
    [
        "SELECT COUNT (*) FROM 'INBOX' WHERE junk = 0;",
        "SELECT COUNT (*) FROM 'INBOX' WHERE junk = 1;",
        "SELECT COUNT (*) FROM 'Trash' WHERE junk = 0;",
        "SELECT COUNT (*) FROM 'Trash' WHERE junk = 1;",
        "SELECT COUNT (*) FROM 'Draft' WHERE junk = 0;",
        "SELECT COUNT (*) FROM 'Draft' WHERE junk = 1;",
    ]
        

Usage

  1. Add install/sqlite-benchmark-install.py into your PATH
  2. Hit sqlite-benchmark-install.py command in an empty directory in which you want to construct benchmark environment.
  3. Modify these 3 files to fit your experimental environment. python/SQL.py , python/Config.py , and make/Makefile
  4. Just hit `make’ command in make/ directory.
  5. You get graphs in resultsGraph/ directory.

Thanks

I used these scripts with a little modifications.

About

Flexible SQLite benchmark toolsets. Easily get result graphs.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages