Skip to content

Commit

Permalink
needed to add .append statement to ensure getting everything
Browse files Browse the repository at this point in the history
  • Loading branch information
Luis M Silva committed Mar 29, 2016
1 parent 3a23c13 commit 451b94d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions graph_lfs_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def __init__(self):
self.get_mds_delta = self.get_mds_delta()
self.push_to_graphite = self.push_to_graphite()
elif self.oss:# If flag for mds is set this means we are gathering OSS Stats.
self.delta_oss_list = []
self.dictify_oss = Thread(target = self.dictify_oss_stat()).start()
self.get_oss_delta = self.get_oss_delta()
self.dictify_brw = Thread(target = self.dictify_brw()).start()
Expand Down Expand Up @@ -306,7 +307,10 @@ def get_oss_delta(self):
pvalue = self.write_bytes[key]
delta = (float(value) - float(pvalue))/self.interval
write_bytes_delta[key] = delta
self.delta_oss_list = [read_io_delta, write_io_delta, read_bytes_delta, write_bytes_delta]
self.delta_oss_list.append(read_io_delta)
self.delta_oss_list.append(write_io_delta)
self.delta_oss_list.append(read_bytes_delta)
self.delta_oss_list.append(write_bytes_delta)
logger.debug("Delta list of dicts: %s" %self.delta_oss_list)

def get_oss_brw_delta(self):
Expand All @@ -317,7 +321,7 @@ def get_oss_brw_delta(self):
delta_value = (int(latest_value) - int(previous_value))/self.interval
self.delta_brw_data[latest_metric] = delta_value
logger.debug("ost_delta_brw_data: %s" %self.delta_brw_data)
self.delta_oss_list = [self.delta_brw_data]
self.delta_oss_list.append(self.delta_brw_data)

def push_to_graphite(self):
logger.debug("MDS delta data output: \n%s" %self.delta_data)
Expand Down

0 comments on commit 451b94d

Please sign in to comment.