Skip to content

Commit b91eead

Browse files
authored
Fix benchmarking for hiredis-py (#232)
1 parent 5eadef1 commit b91eead

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎benchmark/benchmark.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import gevent
88
from gevent import monkey
9-
from gevent.coros import Semaphore
9+
from gevent.lock import Semaphore
1010
monkey.patch_all()
1111

1212
parser = optparse.OptionParser()
@@ -39,7 +39,7 @@ def run(clients):
3939
# Time how long it takes for all greenlets to finish
4040
join = partial(gevent.joinall, clients)
4141
time = timeit.timeit(join, number=1)
42-
print "%.2f Kops" % ((len(commands) * count / 1000.0) / time)
42+
print("%.2f Kops" % ((len(commands) * count / 1000.0) / time))
4343

4444
# Let clients connect, and kickstart benchmark a little later
4545
clients = [gevent.spawn(create_client) for _ in range(options.clients)]

0 commit comments

Comments
 (0)