Last week I had somewhere a delay in my flow, but I was not sure which of my nodes was causing that. Could have found it by adding a bunch of debug nodes, or other workarounds. But lately in my daily job I have to work with some expensive performance tools, so I wanted to have a tool in Node-RED that could offer a root cause analysis in an easy way.
So I posted my question, to ask whether something like that existed already. And although the solution from @Steve-Mcl is a very clever one, I decide to develop my own node. One of the main reasons for this decision, is that I have not played yet with the Node-RED messaging hooks. And I have to admit that this is some nice stuff!
So the first 1.0.0 beta of my node-red-contrib-msg-profiler is now available on Github
It allows you to trace messages through your flow, and collect timing information for each node where the msg passes through:
You can use this node "inline", to start profiling of messages passing through. But you can also select which other nodes you want to start the profiling/tracking. I have copied the latter functionality from the Catch node, so all credits for that feature go to Nick!
Here is a demo that shows how to select which node should initiate tracing on messages that pass through them:
As always, all 'constructive' feedback is very welcome!!
Have fun with it,
P.S. I can really advise other Node-RED contributors to start playing with hooks. Those hooks can offer us lots of very useful information, e.g. for troubleshooting...