From d10051bb09942bfd48c6f262a8cdbf5651963c2e Mon Sep 17 00:00:00 2001 From: Taras Date: Thu, 12 Oct 2017 11:07:14 +0300 Subject: Added minor fixes for PR review --- benchmarks/record_batch_compose.py | 12 +++++++----- benchmarks/record_batch_read.py | 10 ++++++---- 2 files changed, 13 insertions(+), 9 deletions(-) (limited to 'benchmarks') 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 -- cgit v1.2.1