{"name":"@nearform/clinic-doctor","version":"2.3.1","keywords":[],"license":"Apache-2.0","_id":"@nearform/clinic-doctor@2.3.1","maintainers":[{"name":"andreasmadsen","email":"amwebdk@gmail.com"},{"name":"davidmarkclements","email":"huperekchuno@googlemail.com"},{"name":"jasnell","email":"jasnell@gmail.com"},{"name":"kamil-mech","email":"kamil.mech@nearform.com"},{"name":"mafintosh","email":"mathiasbuus@gmail.com"},{"name":"matteo.collina","email":"hello@matteocollina.com"},{"name":"mcdonnelldean","email":"mcdonnelldean@outlook.com"},{"name":"yoshuawuyts","email":"yoshuawuyts@gmail.com"}],"homepage":"https://github.com/nearform/node-clinic-doctor#readme","bugs":{"url":"https://github.com/nearform/node-clinic-doctor/issues"},"dist":{"shasum":"5b981e9b9076917cbaa6d37451631a1080e1331d","tarball":"http://registry-npm.ywwl.com/@nearform/clinic-doctor/download/@nearform/clinic-doctor-2.3.1.tgz","fileCount":106,"integrity":"sha512-SvKPjLyqsugirqvD6n1XI8Mw/CrupRpgZyidqla68UGj3LNwialmHivWn5tV4sM+DpsFDiihICw2+XGV+6dhdw==","signatures":[{"sig":"MEUCIQCIrEC9MbcM8VxIk7jf93sSMR2GNFf0vAcIPTiJeRBmqgIgRrploAGC3GQfrMxXcG3hlWrD3XzUUjclhyQvPMf17bw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5953026,"size":3139454,"noattachment":false,"key":"/@nearform/clinic-doctor/-/@nearform/clinic-doctor-2.3.1.tgz"},"engines":{"node":"^8.10.0 || ^9.4.0 || >=10.0.0"},"gitHead":"1051dd7cb6555546514e2a451ff9d2d6635e4c27","scripts":{"lint":"standard --fix | snazzy","test":"standard | snazzy && tap --no-cov test/*.test.js","ci-cov":"tap --100 test/*.test.js","ci-lint":"standard | snazzy","ci-test":"tap test/*.test.js"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/nearform/node-clinic-doctor.git","type":"git"},"_npmVersion":"5.6.0","description":"Programmable interface to clinic doctor","directories":{},"_nodeVersion":"9.9.0","dependencies":{"brfs":"^1.5.0","pump":"^3.0.0","async":"^2.6.0","debug":"^3.1.0","ttest":"^1.1.0","d3-axis":"^1.0.8","pumpify":"^1.3.6","summary":"^1.0.0","d3-array":"^1.2.1","d3-scale":"^2.0.0","d3-shape":"^1.2.0","endpoint":"^0.4.5","showdown":"^1.7.6","JSONStream":"^1.3.2","browserify":"^16.1.1","d3-selection":"^1.1.0","distributions":"^1.1.0","on-net-listen":"^1.0.0","d3-time-format":"^2.1.0","stream-template":"0.0.6","protocol-buffers":"^4.0.4","streaming-json-stringify":"^3.1.0"},"_hasShrinkwrap":false,"devDependencies":{"tap":"^11.1.2","rimraf":"^2.6.2","snazzy":"^7.0.0","cheerio":"^1.0.0-rc.2","standard":"^11.0.1","xorshift":"^1.1.1","startpoint":"^0.3.2"},"_npmOperationalInternal":{"tmp":"tmp/clinic-doctor_2.3.1_1523627658852_0.7962605439209518","host":"s3://npm-registry-packages"},"readme":"# node-clinic-doctor\n\n[![Greenkeeper badge](https://badges.greenkeeper.io/nearform/node-clinic-doctor.svg)](https://greenkeeper.io/)\n[![npm version][2]][3] [![build status][4]][5] [![build status][13]][14]\n[![downloads][8]][9] [![js-standard-style][10]][11]\n\nProgrammable interface to [clinic][12] doctor\n\n![banner](logo.png)\n\n## Supported node versions\n\n* Node.js 9.4.0 and above\n* Node.js 8.10.0 and above\n\nNode.js 8.9.4 also works, however you have to listen to `SIGINT` and shutdown\nthe process nicely. You can find examples in\n[node-clinic-doctor-examples](https://github.com/nearform/node-clinic-doctor-examples/blob/master/slow-io/index.js#L29)\n\n## Example\n\n```js\nconst ClinicDoctor = require('clinic-doctor')\nconst doctor = new ClinicDoctor()\n\ndoctor.collect(['node', './path-to-script.js'], function (err, filepath) {\n  if (err) throw err\n\n  doctor.visualize(filepath, filepath + '.html', function (err) {\n    if (err) throw err\n  });\n})\n```\n\n## Documentation\n\n```js\nconst ClinicDoctor = require('clinic-doctor')\nconst doctor = new ClinicDoctor()\n```\n\n#### `doctor.collect(args, callback)`\n\nStarts a process by using:\n```js\nconst { spawn } = require('child_process')\nspawn(args[0], ['-r', 'sampler.js'].concat(args.slice(1)))\n```\n\nThe injected sampler will produce a file in the current working directory, with the process PID in its filename. The filepath relative to the current working directory will be the value in the callback.\n\nstdout, stderr, and stdin will be relayed to the calling process. As will the `SIGINT` event.\n\n#### `doctor.visualize(dataFilename, outputFilename, callback)`\n\nWill consume the datafile specified by `dataFilename`, this datafile will be produced by the sampler using `doctor.collect`.\n\n`doctor.visualize` will then output a standalone HTML file to `outputFilename`. When completed the `callback` will be called with no extra arguments, except a possible error.\n\n## License\n[Apache 2.0](https://tldrlegal.com/license/apache-license-2.0-(apache-2.0))\n\n[0]: https://img.shields.io/badge/stability-experimental-orange.svg?style=flat-square\n[1]: https://nodejs.org/api/documentation.html#documentation_stability_index\n[2]: https://img.shields.io/npm/v/@nearform/clinic-doctor.svg?style=flat-square\n[3]: https://www.npmjs.org/@nearform/clinic-doctor\n[4]: https://circleci.com/gh/nearform/node-clinic-doctor/tree/master.svg?style=shield&circle-token=c26d5926558ff909ef0384756c3b70bc6151866e\n[5]: https://circleci.com/gh/nearform/node-clinic-doctor\n[6]: https://img.shields.io/codecov/c/github/nearform/node-clinic-doctor/master.svg?style=flat-square\n[7]: https://codecov.io/github/nearform/node-clinic-doctor\n[8]: http://img.shields.io/npm/dm/@nearform/clinic-doctor.svg?style=flat-square\n[9]: https://www.npmjs.org/@nearform/clinic-doctor\n[10]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\n[11]: https://github.com/feross/standard\n[12]: https://github.com/nearform/node-clinic\n[13]: https://ci.appveyor.com/api/projects/status/xxijxjm3fhwhb5x6?svg=true\n[14]: https://ci.appveyor.com/project/nearForm/node-clinic-doctor\n","publish_time":1523627659120,"_cnpm_publish_time":1523627659120,"dist-tags":{"latest":"2.6.1"}}