This is a
playground to test code. It runs a full
Node.js environment and already has all of
npm’s 400,000 packages pre-installed, including
node-red-contrib-prib-functions with all
npm packages installed. Try it out:
node-red-contrib-prib-functions lists no main file and has no index.js, so it can't be directly required. If this is a mistake, please let us know. It may however contain internal files that you can require manually:
This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.
Node-Red nodes for various functions:
Real time metrics which are recalculated on single of data point and posted in msg.result. Key and value can be selected from msg.payload. Sending message with topic"@stats" places message with all stats on second port. If realtime metrics then a third port is shown where the message is sent if it is an outlier being outside 3 standard deviations from mean.
A set of data analysis functions that can be run over an array of data
Single value metrics:
Allows a test case for a message to allow simple testing of nodes. Injects a new message via mouse or message. Message sent to first port which can be consumed by other nodes and returned back to node in a loop. The Test node then checks against detailed expected payload result.
Append file(s) to payload. Cached to maximise performance. Require can be used to find file.
Inject messages for a set period of time with varying think time. Primary purpose is testing and useful for load/stress testing.
Add on wire between two flows to see message rates in status line. Rate sampled every second and provides rate last second / 10 seconds / 1 minute / 5 minutes.
Spawn process as per node.js manual with ability to set working directory, environment variables and argument passed to process. STDOUT and STDERR are sent as individual messages. RC port is sent a message on closure. Takes in messages that starts a process with ability to add environment values. Message can be sent to kill the process.
Test if host is available sending msg to up or down port so action can be taken. Message only sent on state change or if message is sent which doesn't have topic refreshHostAvailable. This topic forces a check rather than time check which can be set.
The metrics from node.js os
Run the following command in the root directory of your Node-RED install
npm install node-red-contrib-prib-functions
Test/example flow in test/generalTest.json
0.9.1 Add outlier detection 0.9.0 Add Pearson R realtime metrics
0.8.1 Add the tests for realtime metrics 0.8.0 Add realtime metrics to data analysis
0.4.0 Add test, monitor flow, data analysis