Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

strong-trace-waterfalltransform

strongloop6271.0.1

Transform waterfall trace data into other useful data structures

strongloop, profiler, monitoring

readme

strong-trace-waterfalltransform

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

Install

npm install --save strong-trace-waterfalltransform`

Usage

var xform = require('strong-trace-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
          }
        ]
      }
    ]
  ]
}

changelog

2015-06-03, Version 1.0.1

  • remove loc from Name in Inspector Name in Inspector is a combination of module and funciton name. It does not make sense to append line number and column position to it. Besides, it's redundant because file name, line and column exist separately in the Inspector frame. (Setogit)

  • set ceiling to avioid >100% or negative numbers (Setogit)

  • make 'npm test' work for both linux and windows (Setogit)

2015-04-01, Version 1.0.0

  • Rename concrix to strong-trace in test modules (Setogit)

  • Add standard StrongLoop boilerplate to all renamed Concurix repos (Setogit)

  • Update README.md (Erik Sundahl)

  • remove console.logs (Alex Gounares)

  • improve subtree elimination (Alex Gounares)

  • wip on perf, fix subtreeID double recursion problem (Alex Gounares)

  • split out concurix launcher (Alex Gounares)

  • add concurix for profiling (Alex Gounares)

  • initial skeleton (Alex Gounares)

  • get newest waterfalldata (Alex Gounares)

  • cleanup travis (Alex Gounares)

  • use public version of concurix-waterfalldata (Alex Gounares)

  • fix null case (Alex Gounares)

  • update license (Alex Gounares)

  • adds license (Erik Sundahl)

  • cleanup (Erik Sundahl)

  • fixes missing top costs closes Concurix/cx#97 (Erik Sundahl)

  • fixes top cost closes Concurix/cx#97 (Erik Sundahl)

  • simplifying summary_text by removing percentage closes #112 (Erik Sundahl)

  • adds syncCost property (Erik Sundahl)

2014-09-15, Version 0.0.30

  • fix tests, add tap support (Alex Gounares)

  • temporary breakage for id mismatch bug (Alex Gounares)

  • fixes costDetails (Erik Sundahl)

2014-08-20, Version 0.0.28

  • add costree percentages (Erik Sundahl)

  • fixes missing space Closes concurix/cx#57 (Erik Sundahl)

  • changes undefined transactions to untagged (Erik Sundahl)

  • converts internal to uninstrumented js (Erik Sundahl)

2014-08-07, Version 0.0.27

  • Fix idle percent (Bryce Baril)

  • fix typo (alexgo)

2014-07-29, Version 0.0.25

  • add tests for summary stats (Alex Gounares)

2014-07-29, Version 0.0.24

  • update summary stats (Alex Gounares)

2014-07-28, Version 0.0.23

  • remove unneeded error for now (Alex Gounares)

2014-07-28, Version 0.0.22

  • First stab at summary info. per-instance for individual waterfalls, aggregate for transactions and the whole trace file. No tests added yet. (Bryce Baril)

  • add full tag transform functionality (Alex Gounares)

  • beginning of group by tags (Erik Sundahl)

  • Remove log statement (Erik Sundahl)

2014-07-23, Version 0.0.20

  • fix summary text (Alex Gounares)

2014-07-23, Version 0.0.19

  • improve summary text (Alex Gounares)

2014-07-23, Version 0.0.18

  • add top modules calculation (Alex Gounares)

2014-07-23, Version 0.0.17

  • add topcosts (Alex Gounares)

2014-07-22, Version 0.0.16

  • add summaryText (Alex Gounares)

2014-07-22, Version 0.0.15

  • add name summary to event loop aggregate (Alex Gounares)

  • misc strict cleanup (Alex Gounares)

2014-07-22, Version 0.0.14

  • add uid for treeCost (Alex Gounares)

2014-07-18, Version 0.0.13

  • sort and add synthetic ids (Alex Gounares)

  • add in start and ends for event loop aggregation (Alex Gounares)

2014-07-16, Version 0.0.12

  • add more tests (Alex Gounares)

2014-07-16, Version 0.0.11

  • fix event loop aggregate (Alex Gounares)

  • add additional tests to track down issue (Alex Gounares)

  • moved sample tracefile to waterfalldata repo (Erik Sundahl)

  • add tracefile (Erik Sundahl)

2014-07-15, Version 0.0.10

  • add subtree to costTree (Alex Gounares)

  • add names to event loop aggregate (Alex Gounares)

  • wip, match up nesting waits and tree cost children (Alex Gounares)

  • add to enhance (Alex Gounares)

  • wip (Alex Gounares)

  • update jshint config (Alex Gounares)

  • rename inner treeCost method from the demo name to treeCost (Bryce Baril)

  • Add cost_tree.js & tests (Bryce Baril)

  • Add more id_to_tree tests, expose it externally (Bryce Baril)

  • switch to uid for synthetic ids (Alex Gounares)

  • fix id bug in summaries (Alex Gounares)

  • add segment ids (Alex Gounares)

  • add more tests (Alex Gounares)

  • add summary test (Alex Gounares)

  • update docs, more summary work (Alex Gounares)

  • initial summary implementation (Alex Gounares)

  • modify subsegments to use computed tree (Alex Gounares)

  • compute the tree form of the waterfall (Alex Gounares)

  • initial refactor (Alex Gounares)

  • switch to char-based id parser for now with new format (Bryce Baril)

  • Add blockedMicros stat to waterfalls (Bryce Baril)

  • really fix parent mapping (Alex Gounares)

  • add segment pointer (Alex Gounares)

  • add a maxDepth property (Alex Gounares)

  • cleanup (Alex Gounares)

  • don't propagate children (Alex Gounares)

  • better factor child and sub segments (Alex Gounares)

  • inline grammar (Alex Gounares)

  • add waterfall stats (Alex Gounares)

  • add version (alexgo)

  • add depth property to segments (alexgo)

  • cleanup tests (alexgo)

  • fix exclusive bugs (alexgo)

  • initial version of waterfall enhance, still some math errors in it (alexgo)

  • add key to travis file (Alex Gounares)

2014-06-20, Version 0.0.9

  • update to new waterfalldata repo (Alex Gounares)

2014-06-13, Version 0.0.8

  • improve waterall graph output (Alex Gounares)

2014-06-12, Version 0.0.7

  • update data (Alex Gounares)

2014-06-11, Version 0.0.6

  • update to latest data (Alex Gounares)

2014-06-11, Version 0.0.5

  • fix return value (Alex Gounares)

2014-06-11, Version 0.0.4

  • remove console.log (Alex Gounares)

2014-06-10, Version 0.0.3

  • update to latest format, update tests (Alex Gounares)

  • adapt to old field names, fix num_calls (Alex Gounares)

  • include callbacks (Alex Gounares)

  • update readme, add more data (Alex Gounares)

2014-06-10, Version 0.0.2

  • First release!