IRC Logs for #circuits Sunday, 2015-05-10

*** RNeville has joined #circuits00:10
RNevillehello, looking for a good multimeter for my bench. Would hand held meter be better value than a true desktop dmm?00:26
pdurbinRNeville: please see the /topic00:28
RNevillesorry, still not sure of topic, is this channel for a python circuit sim program?00:29
spaceoneRNeville: this channel is for the python framework 'circuits'00:44
RNevillethx spaceone00:45
*** RNeville has quit IRC04:29
*** shadwick has joined #circuits07:05
*** shadwick has left #circuits ("Quit")07:05
riothas anyone streamed video to a webclient via circuits?14:13
nizoxHTTP live streaming?14:18
riotyeah,14:18
rioti think the most senseful way is to use ffmpeg, it supports spitting out http-streams14:18
nizoxI never did14:18
nizoxbut you might be interested by http://leandromoreira.com.br/2015/04/26/fifa-2014-world-cup-live-stream-architecture/14:19
riotnah, i'm only dishing out to 5-10 clients at most14:19
*** Romster has quit IRC14:19
*** Romster has joined #circuits14:20
nizoxI see no reason preventing the use of circuits to do this14:25
riotffserver seems to be pita, imho14:32
rioti think i'd rather try to get at the picture via opencv and handle it out via websocket. i doubt the framerate will be nice, but lets see14:33
riotugh, still no py3 opencv, except at github :/14:51
riotis there a lower limit on how fast i can run timers? i don't seem to be able to run code at more than 10 Hz16:45
spaceonewould it be easy to show all handlers which are executed in Debugger?20:07
prologicriot, nizox circuits can stream this kind of data to web clients quite easily :)20:40
prologiceither over websockets or http streams20:41
prologicspaceone, I think so -- you mean all event handlers that got run for a given event?20:41
spaceoneprologic: yes20:51
spaceoneprologic: are they stored at the event or somewhere?20:51
prologicevent.handlers?20:59
prologictrouble is although we collet that data20:59
prologicI don't think we append ever handler that got executed20:59
prologicso if you need that info we'll have to change some of the internals there21:00
prologicwhat's the use-case?21:00
spaceonejust for the Debugger21:00
spaceoneDebugger(handlers=True)21:00
spaceoneso that one can easy see the priority + when a even stopped21:01
spaceoneprologic:21:01
prologichmm21:02
prologicokay so we could do it at the Debugger level instead21:02
prologicrather than modifying any internals21:02
spaceoneyes21:02
prologicthe global event logger in the Debugger21:02
spaceonei will have a look if event.handlers is enough21:02
prologiccan be used to mutate a .handlers attribute on the event object in question21:02
prologicyou can use that in the exception handler too later on if an exception is raised in any of the handlers21:03
prologicbut yeah you're right21:03
prologicno need to modify internals here21:03
spaceoneyep21:03
prologiccircuits component + eventing == powerful stuff :)21:03
prologicbeen thinking of writing a core component21:04
prologicProfiler21:04
prologicthat traces how long each event handler takes to run and how much cup time it consumes21:04
prologicpotentially allowing a developer to see where their app is getting blocked21:04
prologicIIRC your concurrency rate is determined by the longest running event handler in any given system21:05
spaceoneyes21:09
spaceonethat would be great21:09
spaceonetoday i did some measurements of time using ab21:10
spaceonecircuitsframework 3.9 req/sec (with all html stuff and so on), circuits.http 43 req/s (without html), my website 15.64 req/sec21:12
spaceonehmm22:24
spaceonemy application hangs after yield self.call(MyEvent)22:25
spaceonehmm, i called event.stop() i a handler22:27
spaceoneafter removing this it works22:27
prologicahh22:37
prologicyeah I can see how that might happen22:37
prologicI think if you use call/wait22:37
prologicand then later stop the event22:37
prologicthose coros might not get cleaned up?22:37
spaceonehm, okay i could stop the event after the wait22:38
spaceonewell not really22:38
spaceonehm22:38
prologicyeah kinda tricky huh :)22:41
prologicI suppose if we call event.stop()22:41
prologicwe could somehow trickle an update to delete those coros22:41
prologicand exhaust them immediately22:41
spaceonewhat is 'coros' ?22:42
spaceonei can't use event.stop() to stop other handlers with self.call/wait22:43
prologicwhen call/wait is used in an event handler22:47
prologicit's essentially turned into a coroutine22:47
spaceoneah, coro = coroutine22:47
prologicyeah22:47
prologicso if you call event.stop() on an event handler which has coroutine handlers22:48
prologicthose handlers won't get exhcuasted I don't thinik22:48
prologicand your app will hang22:48
prologicthat's what I *think* is happenning22:48
prologiccould build a simple test case to show this?22:48
spaceoneyes22:48
spaceonewell, that's a bug, right?!22:49
prologicwell sure22:49
prologiclet's call it that :)22:49
spaceoneokay, i'll write a example how to trigger this22:50
prologicI think it makes sense for event.stop() to also kill off any currently running corors?22:50
spaceoneno22:50
spaceonejust return into them22:50
prologichmm22:50
spaceoneevent.stop() means that no further handlers should be called22:50
prologicokay22:50
prologiclet's see the simple test case taht demonstrates this first22:51
prologicand go from there :)22:51
spaceoneok22:51
prologicyes I agree re event.stop() usage22:51
spaceoneotherwise one can't filter event handlers when a handler uses event.stop22:51
spaceoneprologic: btw. is there some async time.sleep thing?23:00
prologicno we don't have one23:05
prologicwhat would it do?23:05
prologicpause the event handler's execution?23:05
spaceonereturn after x seconds into the coroutine23:05
prologicyeah that's what I thought23:05
prologicso it would have to be:23:05
prologicyield Sleep(10)23:05
prologicfor example23:06
prologicand handled by our coro internals23:06
spaceoneyes23:06
prologicnew enhancement :)23:06
spaceoneWTF23:11
spaceoneimplementing this test case is not really easy23:11
spaceoneif a call app.flush() → it executes the thing23:12
spaceoneif i call while app: app.flush() → bam, no handler is ever executed23:12
prologichmm23:13
spaceoneah, flush is only for that instance23:15
spaceoneso i have to call flush for every component instance?23:15
spaceoneargh, simple errors when forgetting 'yield'23:22
prologicspaceone: .flush() should be called on the top-level component23:46
prologicno other sub/child components will have any events in their queue normally23:46
prologicunless you run them as threaded23:46
prologic.start()23:46
prologicbut yeah23:46
prologicnormally there is only one running top-level component23:46
prologicwhich manages all event of the component graph23:46
prologicalso see my comments on your recent PR23:47

Generated by irclog2html.py 2.11.0 by Marius Gedminas - find it at mg.pov.lt!