Giter VIP home page Giter VIP logo

py-tpcc's Issues

txn/s for no of client > 1 is wrong

If i have more than one client, (e.g. 4) i see that i can submit more new orders in same time, than if have only on client. For example.:

Result for one client on my machine (after 120s):
NEW_ORDER 1646 41954704.7615 39.23 txn/s

Result for four clients on my machine (after 120s):
Execution Results after 120 seconds
NEW_ORDER 4657 229757157.326 20.27 txn/s

Obviously 4657 is greater than 1646, but the calculated rate for the second run is smaller than the rate for the first. I think the way it is calculated is wrong. You cannot simply add the execution time in Results.stopTransaction(), because the client are executing in parallel. The right way would be to calculate tx/s per client and then add the results.

Wrong arguments on the ORDERS table loading for Redis and Cassandra driver

On the Redis and Cassandra driver, when loading the ORDERS table, it creates the 'O_C_ID' atribute with the 4th position of the tuple it receives (row[3]).
However, in the generateOrder function of the loader.py, the 'o_c_id' attribute is in the 2nd position of the tuple, so it seems to be inserting the values incorrectly.

Note that I have not been able to test its correctness, as I found this when debuging my own driver based on the redis implementation, so take it with a grain of salt, but it seems to be an issue.

Problems about MongoDB Transaction API

Hi, I'm interesting in benchmarking MongoDB Transaction performances, and I found your project seems to fit my requirement.

But I found that there is no api that support transaction in the document of pymongo 2.7.2,and I cannot find any similar function calls like the following (taken from https://docs.mongodb.com/manual/core/transactions/) in your code:

# For a replica set, include the replica set name and a seedlist of the members in the URI string; e.g.
# uriString = 'mongodb://mongodb0.example.com:27017,mongodb1.example.com:27017/?replicaSet=myRepl'
# For a sharded cluster, connect to the mongos instances; e.g.
# uriString = 'mongodb://mongos0.example.com:27017,mongos1.example.com:27017/'

client = MongoClient(uriString)
wc_majority = WriteConcern("majority", wtimeout=1000)

# Prereq: Create collections.
client.get_database(
    "mydb1", write_concern=wc_majority).foo.insert_one({'abc': 0})
client.get_database(
    "mydb2", write_concern=wc_majority).bar.insert_one({'xyz': 0})

# Step 1: Define the callback that specifies the sequence of operations to perform inside the transactions.
def callback(session):
    collection_one = session.client.mydb1.foo
    collection_two = session.client.mydb2.bar

    # Important:: You must pass the session to the operations.
    collection_one.insert_one({'abc': 1}, session=session)
    collection_two.insert_one({'xyz': 999}, session=session)

# Step 2: Start a client session.
with client.start_session() as session:
    # Step 3: Use with_transaction to start a transaction, execute the callback, and commit (or abort on error).
    session.with_transaction(
        callback, read_concern=ReadConcern('local'),
        write_concern=wc_majority,
        read_preference=ReadPreference.PRIMARY)

Did I misunderstand anything ? How do you implement the atomic transaction operations for MongoDB?
Thanks~

SyntaxError when running benchmarks

When I try to run the benchmark against with Python 3.9, I'm getting a syntax error on tpcc.py line 117.

$ python ./tpcc.py --print-config mongodb
  File "D:\projects\tpcc\apavlo-py-tpcc\pytpcc\tpcc.py", line 117
    except (Exception, AssertionError), ex:
                                      ^
SyntaxError: invalid syntax

Am I using the wrong version of Python for this project?

MongoDB API updated

There is an error when trying to use mongodb driver:
AttributeError: 'module' object has no attribute 'Connection'

You have to use MongoClient instead of Connection (pymongo changed api).

You have to change line 236 of file drivers/mongodbdriver.py to:
self.conn = pymongo.MongoClient(config['host'], int(config['port']))

AssertionError

Loding data aborts with an AssertionError.
The Problem is, that rand.NURand() doesn't allow a None object as nurand, but nurand is never set to something different.

The solution is to import nurand and call nurand.makeForLoad()

Which license for this code ?

Hi there,

Could you please tell us what the license under which you release this code? I.e is it ok to fork it and heavily modify it?

Maybe the simplest would be for you to add a LICENSE file among those proposed by GitHub.

Thanks in advance!

DIdier

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.