Getting started

Creating an account

If you want to see an example of how Concurix works without having to creating an account, you can monitor our example Express app at http://concurix.com/demo.

To create an account for Concurix, go to http://concurix.com/plans and follow the instructions for the product you wish to buy.

Once you have registered, you will be taken to the manage projects page to configure your initial project and get an account key.

Adding Concurix monitoring to your Node.js project

You can set up your own copy of our example project by checking out the Concurix Express Example

Add the concurix-monitor module to your project:

$ npm install --save concurix-monitor

Then, in the beginning of your server code, before you require any modules you wish to monitor, initialize and start the Concurix monitor.

Include your API key.

var cx = require("concurix-monitor")({accountKey: <your account key>});
cx.start();

This wraps the require function to add monitoring to any modules that are subsequently required.

Optional: expose additional debug info

Optionally, you can pass the option --expose-debug-as=v8debug to node when you start your server, which will allow Concurix to display more precise line numbers when inspecting code.

package.json example:

"scripts":{
  "start": "node --expose-debug-as=v8debug server.js"
}

If you start node without the --expose-debug-as=v8debug option, Concurix monitoring will still work, but line numbers will be less precise.

Connecting to your project on concurix.com

Go to to http://concurix.com/dashboard, where you should see your project listed. (If not, check the output from your Node app in your server logs for errors.)

Click the name of your project from the dropdown on the top navigation bar.

Enjoy!

Interpreting the Visualization

The dashboard shows features of a running program. The runtime system watches the running programs, gathering data such as the counts and execution times of calls to exported functions, CPU usage, and the delay between registering a callback function and calling it. Every two seconds, a snapshot of these statistics is written to a file and sent to the dashboard. The dashboard condenses a lot of data; the full-screen option is recommended for smaller text. Some graph features pop up a box of detail when the mouse hovers over them.

Each node denotes a function exported from a Node.js module or a callback passed to a function. Each link summarizes the number of calls between two functions or, for dotted lines, invocations of callbacks. Large nodes represent more execution time than small ones, and thick links represent more calls than thin ones. In both cases, log scaling keeps the elephants from obscuring the mice. Link lengths do not map directly to input data but are rather used to keep nodes from piling up. Node color indicates a function's module.

Frequently asked questions

What do these nodes that are displayed in the profiler represent?

Every node represents a group of functions that have been traced. Depending on the customization settings, multiple functions may be grouped together.

What do the node positions mean, and why do they keep moving?

The graph is layed out top to bottom, similar to a call stack. However, with asynchronous calls, note that it's not always a correct answer for what should be on 'top'

What is an origin?

An origin is the code invoked through an application starting at some origination point, such as a web request. Web routes (e.g. express routes) are built in by default. To see the processing for an individual url for example, simply choose that origin in the customization panel.