npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-red-contrib-fast-debug-counter

v1.3.1

Published

This node is based on the official debug node from Node-RED. It displays selected message properties in the debug sidebar tab and optionally the runtime log with the addition of showing a counter of messages on its status.

Downloads

19

Readme

Overview

This node is based on the official debug node from Node-RED. It displays selected message properties in the debug sidebar tab and optionally the runtime log with the addition of showing a counter of messages on its status.

How to use

For displaying messages on the sidebar it works exactly as the official debug node:

The counter on this node is prepared to receive a huge amount of messages in a short interval of time. The following example has two flows:

  1. The first one updates its status on all 10000 messages that are injected on the flow. It takes more than 20 seconds to achieve that.
  2. The second one is this node, it only updates the messages when the difference of time between the last message and the actual one is bigger than 100 milliseconds. The counter node receives its result immediatly.

Flows from GIFs:

[{"id":"ac81780c.ea5eb8","type":"subflow","name":"counter","info":"","category":"utils","in":[{"x":640,"y":260,"wires":[{"id":"9db79af4.3b8d18"}]}],"out":[],"env":[],"color":"#FFF0F0","icon":"node-red-contrib-message-counter/message-counter.png","status":{"x":900,"y":160,"wires":[{"id":"6862a135.2ca69","port":0}]}},{"id":"9db79af4.3b8d18","type":"function","z":"ac81780c.ea5eb8","name":"Counter","func":"var count = context.get('count')||0;\ncount += 1;\ncontext.set('count',count);\nmsg.count = count;\nnode.status({fill:\"blue\", shape:\"ring\", text:count});\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":860,"y":260,"wires":[[]],"icon":"node-red-dashboard/ui_numeric.png"},{"id":"6862a135.2ca69","type":"status","z":"ac81780c.ea5eb8","name":"","scope":null,"x":740,"y":160,"wires":[[]]},{"id":"4d8450d412c6a5cf","type":"counter","z":"5424eef231a914dc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":860,"y":1060,"wires":[]},{"id":"0a5caad3674e0820","type":"inject","z":"5424eef231a914dc","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":700,"y":1060,"wires":[["4d8450d412c6a5cf"]]},{"id":"82d6229408d9b448","type":"function","z":"5424eef231a914dc","name":"send 10000 messages","func":"for (let i = 0; i < 10000; i++) {\n\tnode.send(msg)\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":900,"y":1260,"wires":[["aafdf6be128499a8"]]},{"id":"027da97261601435","type":"inject","z":"5424eef231a914dc","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":700,"y":1260,"wires":[["82d6229408d9b448"]]},{"id":"225472f16a10979c","type":"counter","z":"5424eef231a914dc","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1100,"y":1340,"wires":[]},{"id":"aafdf6be128499a8","type":"subflow:ac81780c.ea5eb8","z":"5424eef231a914dc","name":"","x":1100,"y":1260,"wires":[]},{"id":"ec439b9c1ddc3007","type":"function","z":"5424eef231a914dc","name":"send 10000 messages","func":"for (let i = 0; i < 10000; i++) {\n\tnode.send(msg)\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":900,"y":1340,"wires":[["225472f16a10979c"]]},{"id":"fe32a3477df41aca","type":"inject","z":"5424eef231a914dc","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":700,"y":1340,"wires":[["ec439b9c1ddc3007"]]},{"id":"5524ce8fde1748cf","type":"comment","z":"5424eef231a914dc","name":"First sampe ","info":"","x":790,"y":1000,"wires":[]},{"id":"0678f00b67a5fb62","type":"comment","z":"5424eef231a914dc","name":"Second sample","info":"","x":800,"y":1200,"wires":[]}]