Skip to content
Snippets Groups Projects
Commit a4a2226a authored by Patrick Godwin's avatar Patrick Godwin
Browse files

gstlal_feature_monitor: reduce number of missing channels messages, remove...

gstlal_feature_monitor: reduce number of missing channels messages, remove close connection line causing crashes upon shutdown
parent 2dfbe59d
No related branches found
No related tags found
No related merge requests found
...@@ -168,6 +168,9 @@ class StreamMonitor(object): ...@@ -168,6 +168,9 @@ class StreamMonitor(object):
if self.timestamp: if self.timestamp:
if not self.last_save or utils.in_new_epoch(self.timestamp, self.last_save, 1): if not self.last_save or utils.in_new_epoch(self.timestamp, self.last_save, 1):
### check for missing channels
missing_channels = set()
metrics = defaultdict(list) metrics = defaultdict(list)
while len(self.feature_queue) > 0: while len(self.feature_queue) > 0:
### remove data with oldest timestamp and process ### remove data with oldest timestamp and process
...@@ -177,9 +180,6 @@ class StreamMonitor(object): ...@@ -177,9 +180,6 @@ class StreamMonitor(object):
### check for missing channels ### check for missing channels
these_channels = set(features.keys()) these_channels = set(features.keys())
missing_channels = self.channels - these_channels missing_channels = self.channels - these_channels
if missing_channels:
logger.info('channels missing @ timestamp=%.3f: %s' % (timestamp, repr(list(missing_channels))))
### generate metrics ### generate metrics
metrics['time'].append(timestamp) metrics['time'].append(timestamp)
metrics['synchronizer_latency'].append(latency) metrics['synchronizer_latency'].append(latency)
...@@ -199,6 +199,9 @@ class StreamMonitor(object): ...@@ -199,6 +199,9 @@ class StreamMonitor(object):
self.last_save = timestamp self.last_save = timestamp
logger.info('processed features up to timestamp %.3f, max latency = %.3f s, percent missing channels = %.3f' % (timestamp, max(metrics['synchronizer_latency']), max(metrics['percent_missed']))) logger.info('processed features up to timestamp %.3f, max latency = %.3f s, percent missing channels = %.3f' % (timestamp, max(metrics['synchronizer_latency']), max(metrics['percent_missed'])))
if missing_channels:
logger.info('channels missing @ timestamp=%.3f: %s' % (timestamp, repr(list(missing_channels))))
def start(self): def start(self):
""" """
...@@ -219,7 +222,6 @@ class StreamMonitor(object): ...@@ -219,7 +222,6 @@ class StreamMonitor(object):
shut down gracefully shut down gracefully
""" """
logger.info('shutting down feature monitor...') logger.info('shutting down feature monitor...')
self.conn.close()
class SignalHandler(object): class SignalHandler(object):
""" """
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment