Changeset - c1fa4f7fe5d1
[Not reviewed]
default
0 3 0
drewp@bigasterisk.com - 20 months ago 2023-06-02 23:16:06
drewp@bigasterisk.com
log & metrics
3 files changed with 12 insertions and 4 deletions:
0 comments (0 inline, 0 general)
light9/effect/effecteval2.py
Show inline comments
 
@@ -102,7 +102,9 @@ class EffectEval2:
 
                v = self._getEffectAttrValue(eaForName, inputs)
 

	
 
            kw[arg.name] = v
 
        log.debug('calling %s with %s', c.func, kw)
 

	
 
        if False and log.isEnabledFor(logging.DEBUG):
 
            log.debug('calling %s with %s', c.func, kw)
 
        return c.func(**kw)
 

	
 
    def _getEffectAttrValue(self, attr: EffectAttr, inputs: EffectSettings) -> VTUnion:
light9/effect/sequencer/eval_faders.py
Show inline comments
 
import traceback
 
import logging
 
import time
 
from dataclasses import dataclass
 
@@ -18,7 +19,7 @@ from light9.typedgraph import typedValue
 
log = logging.getLogger('seq.fader')
 

	
 
COMPILE = Summary('compile_graph_fader', '')
 

	
 
COMPUTE_ALL_FADERS = Summary('compute_all_faders', '')
 

	
 
@dataclass
 
class Fader:
 
@@ -72,6 +73,7 @@ class FaderEval:
 
        setAttr = typedValue(EffectAttr, self.graph, setting, L9['effectAttr'])
 
        return (Fader(self.graph, self.lib, cast(URIRef, fader), effect, setAttr))
 

	
 
    @COMPUTE_ALL_FADERS.time()
 
    def computeOutput(self) -> DeviceSettings:
 
        faderEffectOutputs: List[DeviceSettings] = []
 
        now = UnixTime(time.time())
 
@@ -89,3 +91,7 @@ class FaderEval:
 
                raise
 

	
 
        return DeviceSettings.merge(self.graph, faderEffectOutputs)
 
        merged = DeviceSettings.merge(self.graph, faderEffectOutputs)
 
        # please remove (after fixing stats display to show it)
 
        log.debug("computed %s faders in %.1fms", len(self.faders), (time.time()-now)*1000)
 
        return merged
light9/effect/sequencer/service.py
Show inline comments
 
@@ -51,9 +51,9 @@ async def send_page_updates(request):
 
def main():
 
    graph = SyncedGraph(networking.rdfdb.url, "effectSequencer")
 
    logging.getLogger('autodepgraphapi').setLevel(logging.INFO)
 
    logging.getLogger('syncedgraph').setLevel(logging.DEBUG)
 
    logging.getLogger('syncedgraph').setLevel(logging.INFO)
 
    logging.getLogger('sse_starlette.sse').setLevel(logging.INFO)
 
    logging.getLogger('effecteval').setLevel(logging.INFO)
 
    logging.getLogger('effecteval').setLevel(logging.DEBUG)
 

	
 
    # seq = Sequencer(graph, send)  # per-song timed notes
 
    lib = EffectFunctionLibrary(graph)
0 comments (0 inline, 0 general)