Re: generating causeway logs

23 views
Skip to first unread message

Terry Stanley

unread,
Feb 22, 2012, 4:26:50 PM2/22/12
to Andrew Sutherland, q-con...@googlegroups.com
Hi Andrew,

Your trace log and Causeway's grid view look somewhat reasonable considering that this is the first attempt. Each time we've instrumented a new platform (Waterken, AmbientTalk) it has taken some time to shake things out. For example, each platform handles promise resolution a bit differently and this is not really appreciated until you start trying to map the mechanics to the trace log format. Of course it doesn't help that Causeway's views can be totally baffling ;).

To figure out what's off, I need to carefully piece together q's promise mechanics and your causality logging. This is not as bad as it sounds, but I'm just learning q so I can't say how long it might take. I do have time this week to work on it.

Question: 'node.js' shows up in the call stack record in the log file. Where is this code?

"name": "startup.processNextTick.process._tickCallback",
"source": "node.js",
 "span": [
            [
              192,
              40
            ]

Thanks,
Terry



Kris Kowal

unread,
Feb 27, 2012, 4:53:02 PM2/27/12
to q-con...@googlegroups.com, Andrew Sutherland
On Wed, Feb 22, 2012 at 1:26 PM, Terry Stanley <coco...@gmail.com> wrote:
> To figure out what's off, I need to carefully piece together q's promise
> mechanics and your causality logging. This is not as bad as it sounds, but
> I'm just learning q so I can't say how long it might take. I do have time
> this week to work on it.
>
> Question: 'node.js' shows up in the call stack record in the log file. Where
> is this code?

I had some trouble isolating the specific line of code. It is internal
to NodeJS and part of the implementation of process.nextTick.

https://github.com/joyent/node/blob/master/src/node.js#L180-205

In Q, we call NodeJS’s process.nextTick to defer a callback into the
next turn of the event loop. We also nextTick implementations shimmed
for modern and legacy browsers, so the stack will vary from platform
to platform. In legacy browsers, it falls back to setTimeout, which
has a standardized minimum lag of some milliseconds. In newer
browsers, we use a hack based on a behavior of MessagePort that
side-steps the minimum delay.

Kris Kowal

Reply all
Reply to author
Forward
0 new messages