{"versions":{"1.0.0":{"name":"cpuprofile-filter","version":"1.0.0","description":".cpuprofile filter","main":"src/cpuprofile-filter.js","dependencies":{"json5":"^0.5.1","lodash":"^4.17.4"},"devDependencies":{"chai":"^4.1.2","chrome-launcher":"^0.4.0","chrome-remote-interface":"^0.24.3","eslint-config-nicjansma":"^1.0.4","gulp":"^3.9.1","gulp-eslint":"^4.0.0","gulp-jsoncombine":"^1.0.3","gulp-rename":"^1.2.2","gulp-spawn-mocha":"^3.3.1","gulp-uglify":"^3.0.0","mocha":"^3.5.3"},"author":{"name":"Nic Jansma"},"license":"MIT","scripts":{"test":"gulp travis --verbose"},"gitHead":"de75110c35fbfe8e8a5146be07b5e4102b4ffa85","_id":"cpuprofile-filter@1.0.0","_npmVersion":"5.4.1","_nodeVersion":"8.5.0","_npmUser":{"name":"anonymous","email":"nic@nicj.net"},"dist":{"integrity":"sha512-ox2CxxEMig67PyB7icEI7z1Fmf6JE0W/2vfjHBjEf8LM7iDxw0b96GzJHTpAmcYSdeNnr4Ks66bJYDth5B7z+w==","shasum":"1af9966b25a20c63c2e7e801bb575e8324addc09","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/cpuprofile-filter/-/cpuprofile-filter-1.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGzHVOXNN1phOJ8c6+RCeqOasIQEm/TrjGqWdJ1kgrizAiEAnjl4NEPT+OyfqTfT4DoJbSEwdDE4vIPGSZ+DSGUKRzo="}]},"maintainers":[{"name":"anonymous","email":"nic@nicj.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cpuprofile-filter-1.0.0.tgz_1505354975392_0.11115495627745986"},"directories":{},"contributors":[]},"1.1.0":{"name":"cpuprofile-filter","version":"1.1.0","description":".cpuprofile filter","main":"src/cpuprofile-filter.js","dependencies":{"json5":"^0.5.1","lodash":"^4.17.4"},"devDependencies":{"chai":"^4.1.2","chrome-launcher":"^0.4.0","chrome-remote-interface":"^0.24.3","eslint-config-nicjansma":"^1.0.4","gulp":"^3.9.1","gulp-eslint":"^4.0.0","gulp-jsoncombine":"^1.0.3","gulp-rename":"^1.2.2","gulp-spawn-mocha":"^3.3.1","gulp-uglify":"^3.0.0","mocha":"^3.5.3"},"author":{"name":"Nic Jansma"},"license":"MIT","scripts":{"test":"gulp travis --verbose"},"gitHead":"2792a3d990748d37b7ef92e74a885f8716e14f47","_id":"cpuprofile-filter@1.1.0","_npmVersion":"5.4.1","_nodeVersion":"8.5.0","_npmUser":{"name":"anonymous","email":"nic@nicj.net"},"dist":{"integrity":"sha512-rCnpXuG+i4bq/ZcLPNEE4/4o4Y0xNCeQDB+X3vYmoNxSWcZzYttWVCoLMfIXSPwFN0CbGm6TCO6NEj7VGdb2ig==","shasum":"8c922ec900bf43965bc7b730943509c60a5ff327","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/cpuprofile-filter/-/cpuprofile-filter-1.1.0.tgz","fileCount":11,"unpackedSize":15683,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbAhx0CRA9TVsSAnZWagAA7gMP/1Tv/yx1BhStN9FCpVE6\nUNZSfjh0ljyp6rWVcOF8AYft1oj+yCHoDxUkJH7Jr1azvzo2P7WXc6SMfB+o\nSjDmrffdI82+dC4+pphCqF6olIK8H9rXM6Wum22ltfzlkTH3XsmXAPs2CEUG\njOlxzRYVdHyk9sUNbKtfFgkQE2GQQCdJqQZ+/m20QMCASoE+MOxTrMeNDX2/\nZRHDCQK3wJ50ptMhAMlTCeJUwS8fsL6JtOADAggII6uLtgqgYKE6By6JUuPW\n3JdgyqCGpaK0efTtgF4OkO+XjpPdeRIuOvTkbEUAxd89jWm6fdeZs0A/I4LW\nJS2M6MD+0WSTf0c2bzwenmGWpX4Y8ff6TYiW9fCJDYLaqMGDjl5dlNJhmbPc\n615BIN6DauluWGGdUhdildQ8E2A8VxH/8oHm53HM2Yar9+34aI0j6FV8YNMO\nRmBK9pikP/aU77k6PiPXssEqTGqZzjBUbheZfjfnf6PIT09+N/qiLFg+lYfI\nsuBsDCfjAPDA7Eu29hLOtdrFAH3SSDbHcuK7n9bBJp0F4JI4T7f4hooLqNbV\n+g64LQDaFjUp1x3iXfq3Pq0kgBZXC3j3EE9HRbGD6ej2hVTpbq5NMOUIXpIG\np24FC502z+b7vrjBUldqcm1PyPCXynvDV/8usZilO29Nu4THsMZA44VqbCGc\nl4W4\r\n=powj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAbLRHXWbUH7zgaT4Imo4tHp5l/KDCAB2jM45bneZptdAiAOOP68133g686AKRg3k+ijTz1AfRu9LwuCrD1Vde+wDw=="}]},"maintainers":[{"name":"anonymous","email":"nic@nicj.net"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cpuprofile-filter_1.1.0_1526865011364_0.20357707966227"},"_hasShrinkwrap":false,"contributors":[]}},"dist-tags":{"latest":"1.1.0"},"name":"cpuprofile-filter","time":{"modified":"2022-01-26T18:56:06.069Z","created":"2022-01-26T18:56:06.069Z","1.0.0":"2017-09-14T02:09:36.356Z","1.1.0":"2018-05-21T01:10:11.441Z"},"readme":"# cpuprofile-filter\n\nv1.1.0\n\n[via Nic Jansma http://nicj.net](http://nicj.net)\n\nLicensed under the MIT license\n\n## Introduction\n\nTakes a `.cpuprofile` and determines the amount of time that was spent in or under\n(inclusive) a configurable list of source files.\n\nAs an example use case, `cpuprofile-filter` can be used to determine how much\nwork a first- or third-party library is doing during page load.\n\n## Download\n\nReleases are available for download from [GitHub](https://github.com/nicjansma/cpuprofile-filter.js).\n\n### NPM\n\n`cpuprofile-filter` is available as the [npm cpuprofile-filter module](https://npmjs.org/package/cpuprofile-filter). You can install it\nusing Node Package Manager (npm):\n\n    npm install cpuprofile-filter\n\n## Usage\n\nGiven a `.cpuprofile` input (JSON), `cpuprofile-filter` will analyze all of the stacks\nin the profile and calculate statistics such as how long the profile was captured for,\ntotal CPU time, idle CPU time, and the inclusive CPU time that was spent in the list of target files.\n\n```js\n// import\nvar CpuProfileFilter = require(\"cpuprofile-filter\");\n\n// filter a profile\nvar results = CpuProfileFilter.filter(profile, config);\n\n// filtered CPU time\nvar time = results.cpuTimeFiltered;\n```\n\nFor example, you could specify a configuration of:\n\n```js\nCpuProfileFilter.filter(profile, {\n    \"files\": [\n        \"a.js\"\n    ]\n});\n```\n\nAnd `cpuprofile-filter` will return the amount of time (in microseconds) that\nwere spent in any function of `a.js`, and, any work done (in any other function\nor file) triggered by a function in `a.js`.\n\n`cpuprofile-filter` can optionally be given a list of functions to ignore.\n\nFor example, you could specify that you want to track anything in `a.js` _except_\nfor calls to `wrapper()` in `a.js`:\n\n```js\nCpuProfileFilter.filter(profile, {\n    \"files\": [\n        \"a.js\"\n    ],\n    \"ignore\": [\n        {\n            \"functionName\": \"wrapper\"\n        }\n    ]\n});\n```\n\nFor the above example, note that as long as there is a second or more\nfunction in `a.js` besides `wrapper()` on the call stack, the sample will still be counted.\n\n### API\n\n#### `CpuProfileFilter.filter(profile, config)`\n\nFilters a `.cpuprofile` against the given config\n\n**Arguments**:\n* `profile`: `.cpuprofile` data (in JSON)\n* `config`\n* `config.files`: A list of file names to filter\n* `config.ignore`: A list of ignores\n* `config.ignore.functionName`: A function name to ignore\n\n**Returns**: An object with the following properties\n\n```js\n{\n    startTime: 1000,        // start time (microseconds)\n    endTime: 2000,          // end time (microseconds)\n    duration: 1000,         // duration (microseconds)\n    sampleCount: 10,        // number of samples\n    timePerSample: 100,     // time per sample (microseconds)\n    cpuTime: 1000,          // CPU time of the entire profile (including Program and Garbage time) (microseconds)\n    cpuTimeFiltered: 500,   // CPU time of the filtered functions (microseconds)\n    idleTime: 0             // Idle time (microseconds)\n    programTime: 0          // Program (Chrome native) time (microseconds)\n    garbageTime: 0          // Garbage Collector time (microseconds)\n}\n```\n\n## Tests\n\nTests are provided in the ``test/`` directory, and can be run via ``mocha``:\n\n    mocha test/*\n\nOr via ``gulp``:\n\n    gulp test\n\n## Version History\n\n* v1.0.0 - 2017-09-13: Initial version\n* v1.1.0 - 2018-05-20: Added `programTime` and `garbageTime` fields","users":{}}