Skip to content

Commit

Permalink
Fix transactional behavior in bench
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
coleifer committed Sep 8, 2018
1 parent fb2268a commit ee95162
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions bench.py
Expand Up @@ -51,10 +51,9 @@ def insert(i):

@timed
def batch_insert(i):
with db.atomic():
it = range(i * 1000, (i + 1) * 1000)
for i in db.batch_commit(it, 100):
Register.insert(value=i).execute()
it = range(i * 1000, (i + 1) * 1000)
for i in db.batch_commit(it, 100):
Register.insert(value=i).execute()

@timed
def bulk_insert(i):
Expand Down

0 comments on commit ee95162

Please sign in to comment.