Skip to content

Commit

Permalink
Merge pull request #619 from fomars/release
Browse files Browse the repository at this point in the history
jmeter aggregator fix
  • Loading branch information
fomars authored Jul 5, 2018
2 parents f8e823d + f50ec38 commit 43992e9
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions yandextank/plugins/JMeter/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def __init__(self, source):
self.source = source

def __iter__(self):
for ts, chunk in self.source:
for ts, chunk, rps in self.source:
stats = self.worker.aggregate(chunk)
yield [{
'ts': ts,
Expand Down Expand Up @@ -167,13 +167,13 @@ def __init__(self, filename):

def _read_stat_queue(self):
while not self.closed:
for _ in range(self.stat_queue.qsize()):
try:
si = self.stat_queue.get_nowait()
if si is not None:
yield si
except q.Empty:
break
# for _ in range(self.stat_queue.qsize()):
try:
si = self.stat_queue.get_nowait()
if si is not None:
yield si
except q.Empty:
pass

def _read_jtl_chunk(self, jtl):
data = jtl.read(1024 * 1024 * 10)
Expand All @@ -184,6 +184,7 @@ def _read_jtl_chunk(self, jtl):
self.buffer = parts[1]
df = string_to_df(ready_chunk)
self.stat_queue.put(df)

return df
else:
self.buffer += parts[0]
Expand Down

0 comments on commit 43992e9

Please sign in to comment.