summaryrefslogtreecommitdiff
path: root/benchmarks/consumer_performance.py
diff options
context:
space:
mode:
authorJeff Widman <jeff@jeffwidman.com>2018-10-22 01:24:50 -0700
committerJeff Widman <jeff@jeffwidman.com>2018-10-22 14:30:33 -0700
commitb83feeca2ec6f6ad745fb7ea47c6484304bb55d8 (patch)
tree7580e387521b388f3af629b9d25278faa26ee349 /benchmarks/consumer_performance.py
parenta6be21e7b3a20ce2e25ef26140c43b59cc356f38 (diff)
downloadkafka-python-b83feeca2ec6f6ad745fb7ea47c6484304bb55d8.tar.gz
Vendor `six` consistently
Use vendored `six`, and also `six.moves.range` rather than `xrange`
Diffstat (limited to 'benchmarks/consumer_performance.py')
-rwxr-xr-xbenchmarks/consumer_performance.py4
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()