{"_id":"strong-trace-waterfalltransform","_rev":"45-4ef643b00ce39faf8c26eb9ac0f06d47","name":"strong-trace-waterfalltransform","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"strong-trace-waterfalltransform","version":"1.0.0","keywords":["strongloop","profiler","monitoring"],"author":{"name":"StrongLoop","email":"engineering@strongloop.com"},"license":{"url":"https://github.com/strongloop/strong-trace-waterfalltransform/blob/master/LICENSE","name":"StrongLoop"},"_id":"strong-trace-waterfalltransform@1.0.0","maintainers":[{"name":"setogit","email":"setogit@gmail.com"}],"homepage":"https://github.com/strongloop/strong-trace-waterfalltransform","bugs":{"url":"https://github.com/strongloop/strong-trace-waterfalltransform/issues"},"dist":{"shasum":"46cea89caeef1d5b78435e3430ffee813c25205a","tarball":"https://registry.npmjs.org/strong-trace-waterfalltransform/-/strong-trace-waterfalltransform-1.0.0.tgz","integrity":"sha512-U7u36sHo7VSTz38EdMqamlcJT5mCVOLhU4dnL/3nb7mnTrlybjsQo/NWgVP3D6YfjAzJJ4FO+WxETkq403GV5g==","signatures":[{"sig":"MEUCIQCJ/HMOW4dlZhny0dUdx9T1beUXaxR6ifVwCeIoYqNp1AIgewb+o51PO1LdczKqbhb0rS1dhoYxw0SMqpX9MZxuwO8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"46cea89caeef1d5b78435e3430ffee813c25205a","gitHead":"223d329988cda3af2523c548c441fb28e2c9d4e9","scripts":{"test":"./node_modules/tap/bin/tap.js --timeout 300 test/index.js"},"_npmUser":{"name":"setogit","email":"setogit@gmail.com"},"repository":{"url":"git://github.com/strongloop/strong-trace-waterfalltransform.git","type":"git"},"_npmVersion":"2.5.1","description":"Transform waterfall trace data into other useful data structures","directories":{},"_nodeVersion":"0.10.33","dependencies":{"pegjs":"^0.8.0","underscore":"^1.6.0"},"jshintConfig":{"asi":true,"node":true,"devel":true,"undef":true,"eqeqeq":false,"eqnull":true,"indent":2,"jquery":true,"newcap":false,"unused":true,"browser":true,"loopfunc":true,"validthis":true,"globalstrict":true},"devDependencies":{"tap":"^0.4.12","tape":"^2.13.4","strong-trace":"^1.2.0","strong-trace-waterfalldata":"^1.0.0"}},"1.0.1":{"name":"strong-trace-waterfalltransform","version":"1.0.1","keywords":["strongloop","profiler","monitoring"],"author":{"name":"StrongLoop","email":"engineering@strongloop.com"},"license":{"url":"https://github.com/strongloop/strong-trace-waterfalltransform/blob/master/LICENSE","name":"StrongLoop"},"_id":"strong-trace-waterfalltransform@1.0.1","maintainers":[{"name":"setogit","email":"setogit@gmail.com"},{"name":"octet","email":"sam@strongloop.com"},{"name":"rmg","email":"r.m.graham@gmail.com"},{"name":"kraman","email":"kraman@strongloop.com"},{"name":"strongloop","email":"callback@strongloop.com"}],"homepage":"https://github.com/strongloop/strong-trace-waterfalltransform","bugs":{"url":"https://github.com/strongloop/strong-trace-waterfalltransform/issues"},"dist":{"shasum":"9d54add03b17eee976aa4bb9fc805d65da626f46","tarball":"https://registry.npmjs.org/strong-trace-waterfalltransform/-/strong-trace-waterfalltransform-1.0.1.tgz","integrity":"sha512-6m9cqSRMudiINqkD8eSMFx+4h0LlBs2HWVe5GVEGTGoPEt+38AzmBhsqcNUSMTTmWe+94z4/BSnDJx57xB5bww==","signatures":[{"sig":"MEUCICyOOCN95AgQNXnGYBwZ9YzTT1koznlO5cEIGqdfvz3bAiEAswIacHxhPmc1ValT0/l/PGbY8IskVOv8m8fUtjc3jyY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"9d54add03b17eee976aa4bb9fc805d65da626f46","gitHead":"71c44150efab93c0fa6a89766a7fdac45993d45f","scripts":{"test":"tap --timeout 300 test/index.js"},"_npmUser":{"name":"octet","email":"sam@strongloop.com"},"repository":{"url":"git://github.com/strongloop/strong-trace-waterfalltransform.git","type":"git"},"_npmVersion":"2.11.0","description":"Transform waterfall trace data into other useful data structures","directories":{},"_nodeVersion":"2.1.0","dependencies":{"pegjs":"^0.8.0","underscore":"^1.6.0"},"jshintConfig":{"asi":true,"node":true,"devel":true,"undef":true,"eqeqeq":false,"eqnull":true,"indent":2,"jquery":true,"newcap":false,"unused":true,"browser":true,"loopfunc":true,"validthis":true,"globalstrict":true},"devDependencies":{"tap":"^0.4.12","tape":"^2.13.4","strong-trace":"^1.2.0","strong-trace-waterfalldata":"^1.0.0"}}},"time":{"created":"2015-04-01T17:57:41.015Z","modified":"2026-04-14T15:16:33.013Z","1.0.0":"2015-04-01T17:57:41.015Z","1.0.1":"2015-06-03T23:55:58.140Z"},"bugs":{"url":"https://github.com/strongloop/strong-trace-waterfalltransform/issues"},"author":{"name":"StrongLoop","email":"engineering@strongloop.com"},"license":{"url":"https://github.com/strongloop/strong-trace-waterfalltransform/blob/master/LICENSE","name":"StrongLoop"},"homepage":"https://github.com/strongloop/strong-trace-waterfalltransform","keywords":["strongloop","profiler","monitoring"],"repository":{"url":"git://github.com/strongloop/strong-trace-waterfalltransform.git","type":"git"},"description":"Transform waterfall trace data into other useful data structures","maintainers":[],"readme":"strong-trace-waterfalltransform\n===========================\n\nTransform functions that take raw waterfall trace formats and transform them into other useful data structures.\n \n# Install\n```sh\nnpm install --save strong-trace-waterfalltransform`\n```\n# Usage\n\n```javascript\nvar xform = require('strong-trace-waterfalltransform')\n```\n\n# API\n\n## xform.graph(waterfall)\n\nConvert a raw waterfall trace into a 'nodes, links' structure with the following schema:\n\n```json\n{\n  \"nodes\": [{\n    \"id\": \"some id\",\n    \"duration\": \"in microseconds\",\n    \"child_duration\": \"in microseconds\",\n    \"exclusive_duration\": \"duration - child_duration\"\n    \"num_calls\": \"number of calls\"\n  }],\n  \"links\": [{\n    \"id\": \"source~target\",\n    \"source\": \"id\",\n    \"target\": \"id\",\n    \"num_calls\": \"number of calls\",\n    \"total_delay\": \"in microseconds\"\n  }]\n}\n```\n## xform.enhanceWaterfall(waterfall, options)\n\nOptions is an object with the following fields:\n```js\n{\n    summaryFactor: 1000  // this controls the summarization factor.  Andything smaller than 1/summaryFactor in size will be aggregated\n}\n```\n\nPerforms an ***inplace*** enhancement of the waterfall trace data structure.  The following fields\nwill be added:\n```json\n{\n  \"waterfalls\": [\n    \"maxEnd\":           //the maximum 'end' value in this waterfall\n    \"summary\": {        //a summary view of the waterfall\n      \"subSegments\": [\n        {\n\n        }\n      ]\n    },\n    \"fnSegs\": []       //array referencing just the function segments\n    \"waitSegs\": []     //array referencing just the wait segments\n    \"segments\": [\n      {\n        \"id\":          //a synthetic id for the segment\n        ...\n        \"subSegments\": [\n          {\n            \"id\":      //a synthethic id for the subsegment\n            \"start\": 0\n            \"end\": 0\n            \"exclusive\": 0\n            \"parent\":   //points back to the parent segment\n          }\n        ]\n      }\n    ]\n  ]\n}\n```\n","readmeFilename":"README.md"}