Skip to content

Commit ae2be02

Browse files
committed
Merge pull request #48 from thijsdezoete/master
Fix: #44
2 parents 3235374 + a35dc42 commit ae2be02

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

mysql_statsd/preprocessors/innodb_preprocessor.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,23 @@ def process(self, rows):
3939
chunks = {'junk': []}
4040
current_chunk = 'junk'
4141
next_chunk = False
42+
oldest_view = False
4243

4344
self.clear_variables()
4445
for row in rows:
4546
innoblob = row[2].replace(',', '').replace(';', '').replace('/s', '').split('\n')
4647
for line in innoblob:
4748
# All chunks start with more than three dashes. Only the individual innodb bufferpools have three dashes
49+
if line.startswith('---OLDEST VIEW---'):
50+
oldest_view = True
4851
if line.startswith('----'):
4952
# First time we see more than four dashes have to record the new chunk
50-
if next_chunk == False:
53+
if next_chunk == False and oldest_view == False:
5154
next_chunk = True
5255
else:
5356
# Second time we see them we just have recorded the chunk
5457
next_chunk = False
58+
oldest_view = False
5559
elif next_chunk == True:
5660
# Record the chunkname and initialize the array
5761
current_chunk = line

0 commit comments

Comments
 (0)