concurix-waterfalltransform

1.0.4 • Public • Published

concurix-waterfalltransform

Build Status

Transform functions that take raw Concurix waterfall trace formats and transform them into other useful data structures.

Install

npm install --save concurix-waterfalltransform`

Usage

var xform = require('concurix-waterfalltransform')

API

xform.graph(waterfall)

Convert a raw waterfall trace into a 'nodes, links' structure with the following schema:

{
  "nodes": [{
    "id": "some id",
    "duration": "in microseconds",
    "child_duration": "in microseconds",
    "exclusive_duration": "duration - child_duration"
    "num_calls": "number of calls"
  }],
  "links": [{
    "id": "source~target",
    "source": "id",
    "target": "id",
    "num_calls": "number of calls",
    "total_delay": "in microseconds"
  }]
}

xform.enhanceWaterfall(waterfall, options)

Options is an object with the following fields:

{
    summaryFactor: 1000  // this controls the summarization factor.  Andything smaller than 1/summaryFactor in size will be aggregated
}

Performs an inplace enhancement of the waterfall trace data structure. The following fields will be added:

{
  "waterfalls": [
    "maxEnd":           //the maximum 'end' value in this waterfall
    "summary": {        //a summary view of the waterfall
      "subSegments": [
        {
 
        }
      ]
    },
    "fnSegs": []       //array referencing just the function segments
    "waitSegs": []     //array referencing just the wait segments
    "segments": [
      {
        "id":          //a synthetic id for the segment
        ...
        "subSegments": [
          {
            "id":      //a synthethic id for the subsegment
            "start": 0
            "end": 0
            "exclusive": 0
            "parent":   //points back to the parent segment
          }
        ]
      }
    ]
  ]
}

Package Sidebar

Install

npm i concurix-waterfalltransform

Weekly Downloads

3

Version

1.0.4

License

none

Last publish

Collaborators

  • dhmlau
  • 0candy
  • hacksparrow