diff options
author | Jeff Widman <jeff@jeffwidman.com> | 2018-10-22 01:24:50 -0700 |
---|---|---|
committer | Jeff Widman <jeff@jeffwidman.com> | 2018-10-22 01:24:50 -0700 |
commit | c6d86b25be338b78c79ec9a0f20a365e67e36537 (patch) | |
tree | 356b2b35146b83407717bf6d79d2997017b67ba0 /benchmarks/consumer_performance.py | |
parent | 08c77499a2e8bc79d6788d70ef96d77752ed6325 (diff) | |
download | kafka-python-vendor-six-consistently.tar.gz |
Vendor `six` consistentlyvendor-six-consistently
Use vendored `six`, and also `six.moves.range` rather than `xrange`
Diffstat (limited to 'benchmarks/consumer_performance.py')
-rwxr-xr-x | benchmarks/consumer_performance.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/benchmarks/consumer_performance.py b/benchmarks/consumer_performance.py index 3e879ae..5ffd3f5 100755 --- a/benchmarks/consumer_performance.py +++ b/benchmarks/consumer_performance.py @@ -10,6 +10,8 @@ import sys import threading import traceback +from kafka.vendor.six.moves import range + from kafka import KafkaConsumer, KafkaProducer from test.fixtures import KafkaFixture, ZookeeperFixture @@ -64,7 +66,7 @@ class ConsumerPerformance(object): record = bytes(bytearray(args.record_size)) producer = KafkaProducer(compression_type=args.fixture_compression, **props) - for i in xrange(args.num_records): + for i in range(args.num_records): producer.send(topic=args.topic, value=record) producer.flush() producer.close() |