From 711553d4d81fa715664693ed61b0ca2b9001e86d Mon Sep 17 00:00:00 2001 From: Kienan Stewart Date: Thu, 2 Apr 2015 10:46:02 -0400 Subject: [PATCH] Changed debug output; commented out fps from debug --- main.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/main.py b/main.py index b5a7069..512f912 100644 --- a/main.py +++ b/main.py @@ -89,6 +89,7 @@ class MainWindow(FloatLayout): def update_last_temperature(self): + start = time.time() global dataThreadDataQueue # This breaks if there are more updates in the queue than the frequency of update_last_temperature - it pulls old data out of the queue, and not the most recent. done = False @@ -99,8 +100,8 @@ class MainWindow(FloatLayout): except Queue.Empty: done = True if data: - if len(data) > 1: - Logger.debug('update_last_temperature: ' + str(len(data)) + ' items retrieved from queue') + #if len(data) > 1: + # Logger.debug('update_last_temperature: ' + str(len(data)) + ' items retrieved from queue') last_point = data[-1] if self.state == 'paused': # Try to update the last temperature, but not to the plotwidget, @@ -117,13 +118,14 @@ class MainWindow(FloatLayout): if 'exception' in last_point: self.lastStatus = {'status' : 'error', 'message' : data['exception']} self.lastData = data - if dataThreadDataQueue.qsize(): - Logger.debug('update_last_temperature: ' + str(dataThreadDataQueue.qsize()) + ' items left in queue after ' + str(len(data)) + ' items were taken out') + #if dataThreadDataQueue.qsize(): + # Logger.debug('update_last_temperature: ' + str(dataThreadDataQueue.qsize()) + ' items left in queue after ' + str(len(data)) + ' items were taken out') + Logger.debug('update_last_temperature: Took ' + str(time.time() - start) + ' seconds to retrieve ' + str(len(data)) + ' items. ' + str(dataThreadDataQueue.qsize()) + ' items remain in queue') def update(self, dt): self.update_data_sources() self.update_last_temperature() - Logger.debug('MainWindow: FPS ' + str(kivy.clock.Clock.get_fps())) + #Logger.debug('MainWindow: FPS ' + str(kivy.clock.Clock.get_fps())) #Logger.debug('MainWindow: dataThread ' + str(dataThread.name) + ' status: ' + str(dataThread.is_alive()))