summaryrefslogtreecommitdiff
path: root/benchmarks
diff options
context:
space:
mode:
authorTaras <voyn1991@gmail.com>2017-10-12 11:07:14 +0300
committerTaras <voyn1991@gmail.com>2017-10-12 11:10:44 +0300
commitd10051bb09942bfd48c6f262a8cdbf5651963c2e (patch)
tree1f6a262324e3ced9c8655d71fbed5e9ed8a0234d /benchmarks
parente992fbfad926486766ff7b63a499f9cf29984fec (diff)
downloadkafka-python-d10051bb09942bfd48c6f262a8cdbf5651963c2e.tar.gz
Added minor fixes for PR review
Diffstat (limited to 'benchmarks')
-rw-r--r--benchmarks/record_batch_compose.py12
-rw-r--r--benchmarks/record_batch_read.py10
2 files changed, 13 insertions, 9 deletions
diff --git a/benchmarks/record_batch_compose.py b/benchmarks/record_batch_compose.py
index 11320ca..86012df 100644
--- a/benchmarks/record_batch_compose.py
+++ b/benchmarks/record_batch_compose.py
@@ -1,11 +1,13 @@
#!/usr/bin/env python3
from __future__ import print_function
-import perf
-from kafka.record.memory_records import MemoryRecordsBuilder
-import itertools
-import random
import hashlib
+import itertools
import os
+import random
+
+import perf
+
+from kafka.record.memory_records import MemoryRecordsBuilder
DEFAULT_BATCH_SIZE = 1600 * 1024
@@ -13,7 +15,7 @@ KEY_SIZE = 6
VALUE_SIZE = 60
TIMESTAMP_RANGE = [1505824130000, 1505824140000]
-# With values above v1 record is 100 bytes, so 10_000 bytes for 100 messages
+# With values above v1 record is 100 bytes, so 10 000 bytes for 100 messages
MESSAGES_PER_BATCH = 100
diff --git a/benchmarks/record_batch_read.py b/benchmarks/record_batch_read.py
index 4ded5b0..7ae471e 100644
--- a/benchmarks/record_batch_read.py
+++ b/benchmarks/record_batch_read.py
@@ -1,11 +1,13 @@
#!/usr/bin/env python
from __future__ import print_function
-import perf
-from kafka.record.memory_records import MemoryRecords, MemoryRecordsBuilder
-import itertools
-import random
import hashlib
+import itertools
import os
+import random
+
+import perf
+
+from kafka.record.memory_records import MemoryRecords, MemoryRecordsBuilder
DEFAULT_BATCH_SIZE = 1600 * 1024