summaryrefslogtreecommitdiff
path: root/benchmarks/producer_performance.py
diff options
context:
space:
mode:
Diffstat (limited to 'benchmarks/producer_performance.py')
-rwxr-xr-xbenchmarks/producer_performance.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/benchmarks/producer_performance.py b/benchmarks/producer_performance.py
index e958735..0c29cbc 100755
--- a/benchmarks/producer_performance.py
+++ b/benchmarks/producer_performance.py
@@ -9,6 +9,8 @@ import sys
import threading
import traceback
+from kafka.vendor.six.moves import range
+
from kafka import KafkaProducer
from test.fixtures import KafkaFixture, ZookeeperFixture
@@ -77,7 +79,7 @@ class ProducerPerformance(object):
print('-> OK!')
print()
- for i in xrange(args.num_records):
+ for i in range(args.num_records):
producer.send(topic=args.topic, value=record)
producer.flush()