Skip to content

Commit b91511f

Browse files
committed
Fixups for #9
1 parent 96f8512 commit b91511f

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

_python/pgbench_python.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ async def async_psycopg_copy(conn, query, args):
201201
for row in rows:
202202
writer.writerow(row)
203203
f.seek(0)
204-
204+
205205
async with conn.cursor() as cur:
206206
async with cur.copy(query) as copy:
207207
await copy.write(f.read())
@@ -442,6 +442,7 @@ def die(msg):
442442
'psycopg3-async',
443443
'postgresql'
444444
],
445+
)
445446
parser.add_argument(
446447
'queryfile', help='file to read benchmark query information from')
447448

@@ -499,7 +500,7 @@ def die(msg):
499500
arg_format = 'native'
500501
elif args.driver == 'psycopg2':
501502
connector, executor, copy_executor, batch_executor = (
502-
psycopg2_connect, psycopg2_execute,
503+
psycopg2_connect, psycopg2_execute,
503504
psycopg2_copy, psycopg2_executemany,
504505
)
505506
is_async = False
@@ -511,7 +512,7 @@ def die(msg):
511512
arg_format = 'python'
512513
elif args.driver == 'psycopg3-async':
513514
connector, executor, copy_executor, batch_executor = (
514-
async_psycopg_connect, async_psycopg_execute,
515+
async_psycopg_connect, async_psycopg_execute,
515516
async_psycopg_copy, async_psycopg_executemany,
516517
)
517518
is_async = True

pgbench

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,7 @@ BENCHMARKS = [
360360
'python-aiopg',
361361
'python-aiopg-tuples',
362362
'python-asyncpg',
363+
'python-psycopg3-async',
363364
'nodejs-pg-js',
364365
'nodejs-ts-postgres'
365366
]

0 commit comments

Comments
 (0)