Coder Social home page Coder Social logo

pytpcc's Introduction

+ ----------------------------------------------- +
+ Python TPC-C                                    +
+ ----------------------------------------------- +


The basic idea is that you will need to create a new driver file that 
implements the functions defined in "abstractdriver.py". One function will 
load in the tuples into your database for a given table. Then there are five 
separate functions that execute the given transaction based on a set of input 
parameters. All the work for generating the tuples and the input parameters 
for the transactions has been done for you.

Here's what you need to do to get started:

(1) Download the source code from Github:

https://github.com/apavlo/py-tpcc/tree/master/pytpcc

(2) Create a new file in the 'drivers' directory for your system that follows 
the proper naming convention. For example, if your system is 'MongoDB', then 
your new file will be called 'mongodbdriver.py' and that file will contain a 
new class called 'MongodbDriver' (note the capitalization).

(3) Inside your class you will need to implement the required functions of 
defined in AbstractDriver. There is documentation on what these need to do 
also available on Github:

https://github.com/apavlo/py-tpcc/wiki

(3) Try running your system. I would start by defining the configuration file 
that gets returned with by the 'makeDefaultConfig' function in your driver and 
then implement the data loading part first, since that will guide how you 
actually execute the transactions. Using 'MongoDB' as an example again, you 
can print out the driver's configuration dict to a file:

$ python ./tpcc.py --print-config mongodb > mongodb.config

Make any changes you need to 'mongodb.config' (e.g., passwords, hostnames). 
Then test the loader:

$ python ./tpcc.py --no-execute --config=mongodb.config mongodb

You can use the CSV driver if you want to see what the data or transaction 
input parameters will look like. The following command will dump out just the 
input to the driver's functions to files in /tmp/tpcc-*

$ python ./tpcc.py csv

You can also look at my SqliteDriver implementation to get an idea of what 
your transaction implementation functions need to do:

https://github.com/apavlo/py-tpcc/blob/master/pytpcc/drivers/sqlitedriver.py

pytpcc's People

Contributors

apavlo avatar cjharris5 avatar oldsharp avatar yanglu avatar

Watchers

 avatar  avatar

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.