Changeset - 8e2d456b3612
[Not reviewed]
default
0 2 0
Drew Perttula - 6 years ago 2019-06-06 11:59:07
drewp@bigasterisk.com
fix some stats and logging
Ignore-this: d5ed651e17695eaea4e599d5dfaf3b0a
2 files changed with 8 insertions and 4 deletions:
0 comments (0 inline, 0 general)
light9/collector/collector_client.py
Show inline comments
 
@@ -8,13 +8,13 @@ from greplin import scales
 

	
 
log = logging.getLogger('coll_client')
 

	
 
_zmqClient = None
 

	
 
stats = scales.collection(
 
    '/collectorClient/',
 
    '/collectorClient',
 
    scales.PmfStat('send', recalcPeriod=1),
 
)
 

	
 

	
 
class TwistedZmqClient(object):
 

	
light9/effect/sequencer.py
Show inline comments
 
@@ -27,24 +27,24 @@ from greplin import scales
 
import imp
 

	
 
log = logging.getLogger('sequencer')
 

	
 
gatherProcessStats()
 
updateStats = scales.collection(
 
    '/update/',
 
    '/update',
 
    scales.PmfStat('s0_getMusic', recalcPeriod=1),
 
    scales.PmfStat('s1_eval', recalcPeriod=1),
 
    #scales.PmfStat('s3_send_client', recalcPeriod=1),
 
    scales.PmfStat('s3_send', recalcPeriod=1),
 
    scales.PmfStat('updateLoopLatency', recalcPeriod=1),
 
    scales.DoubleStat('updateLoopLatencyGoal'),
 
    scales.RecentFpsStat('updateFps'),
 
    scales.DoubleStat('goalFps'),
 
)
 
compileStats = scales.collection(
 
    '/compile/',
 
    '/compile',
 
    scales.PmfStat('graph', recalcPeriod=1),
 
    scales.PmfStat('song', recalcPeriod=1),
 
)
 

	
 

	
 
class Note(object):
 
@@ -249,13 +249,17 @@ class Sequencer(object):
 
        with updateStats.s1_eval.time():
 
            settings = []
 
            songNotes = sorted(self.notes.get(song, []),
 
                               key=lambda n: n.uri)
 
            noteReports = []
 
            for note in songNotes:
 
                s, report = note.outputSettings(musicState['t'])
 
                try:
 
                    s, report = note.outputSettings(musicState['t'])
 
                except Exception:
 
                    traceback.print_exc()
 
                    raise
 
                noteReports.append(report)
 
                settings.append(s)
 
            devSettings = DeviceSettings.fromList(self.graph, settings)
 

	
 
        dispatcher.send('state', update={'songNotes': noteReports})
 

	
0 comments (0 inline, 0 general)