node package manager


Performance profiling of CAF

CAF (Cloud Assistant Framework)

Co-design permanent, active, stateful, reliable cloud proxies with your web app.


This repository contains a CAF lib to profile the performance of your app. It measures latency, throughput and queue length for CA requests.

Performance data is accessible using a browser, not programmatically from within a CA method.

If your app is called helloworld the url to access latency and throughput info (using GET) is:

and you get something like:



  • InReq # of requests received by that node.js process.
  • OutReq # of requests processed by that node.js process.
  • pending # of queued requests.
  • duration Latency time in msec to process your requests. See the metrics package for details.
  • rate Number of requests processed per second. Averages over a moving window (1min, 5min, 15 min) using exponential decay. See the metrics package for details.

To sample the number of pending messages, set env.traceProfiler.interval in framework.json to the number of seconds between samples, and then:

and to finish profiling:

that will display an array:

 "plugs" : [
         "module": "caf_profiler/plug",
         "name": "profiler",
         "description": "Performance profiling of CA requests\n Properties: <traceProfiler> {interval: <secs>}  enables queue length profiling\n",
         "env" : {
             "traceProfiler": {
                "interval" : 0.01