{"id":13802585,"url":"https://github.com/thlorenz/traceviewify","last_synced_at":"2025-04-30T06:29:52.726Z","repository":{"id":26710111,"uuid":"30167336","full_name":"thlorenz/traceviewify","owner":"thlorenz","description":"Converts .cpuprofile format to trace viewer JSON object format to allow analysing the data in chrome://tracing.","archived":false,"fork":false,"pushed_at":"2015-02-06T23:32:15.000Z","size":2340,"stargazers_count":55,"open_issues_count":1,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-21T11:07:30.450Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://thlorenz.github.io/traceviewify/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thlorenz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-02T02:10:27.000Z","updated_at":"2023-09-14T14:43:52.000Z","dependencies_parsed_at":"2022-09-02T18:22:51.071Z","dependency_job_id":null,"html_url":"https://github.com/thlorenz/traceviewify","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thlorenz%2Ftraceviewify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thlorenz%2Ftraceviewify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thlorenz%2Ftraceviewify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thlorenz%2Ftraceviewify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thlorenz","download_url":"https://codeload.github.com/thlorenz/traceviewify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251653781,"owners_count":21622191,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T00:01:47.926Z","updated_at":"2025-04-30T06:29:52.703Z","avatar_url":"https://github.com/thlorenz.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# traceviewify [![build status](https://secure.travis-ci.org/thlorenz/traceviewify.png)](http://travis-ci.org/thlorenz/traceviewify)\n\n[![testling badge](https://ci.testling.com/thlorenz/traceviewify.png)](https://ci.testling.com/thlorenz/traceviewify)\n\nConverts `.cpuprofile` format to trace viewer [JSON object\nformat](https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/edit#heading=h.q8di1j2nawlp) to allow analysing the data in chrome://tracing.\n\n```js\nvar traceviewify = require('traceviewify');\nvar cpuprofile = require('./fixtures/fibonacci.cpuprofile');\n\nvar traceviewObjectFormat = traceviewify(cpuprofile); \n```\n\n[live demo](http://thlorenz.github.io/traceviewify/)\n\n## Screenshots\n\n[![screenshot](assets/traceview.png)](http://thlorenz.github.io/traceviewify/)\n\n*The screenshot above shows [chrome://tracing](chrome://tracing) timeline and sunburst of traceviewified data*\n\n![screenshot](assets/cpuprofile.png)\n\n*The screenshot above shows DevTools with `.cpuprofile` from which the traceview was generated*\n\n## Usage\n\n```\ncat some.cpuprofile | traceviewify \u003e trace.json\n```\n\nThen load it into [chrome://tracing](chrome://tracing).\n\n## Installation\n\n    npm install traceviewify\n\n## DTrace\n\nA [simple DTrace script](https://github.com/thlorenz/traceviewify/blob/master/tools/trace_entry_return.d) was also added\nwhich generates trace viewer events. The resulting JSON can be directly imported into\n[chrome://tracing](chrome://tracing).\n\n## API\n\n\n\u003c!-- START docme generated API please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN docme TO UPDATE --\u003e\n\n\u003cdiv\u003e\n\u003cdiv class=\"jsdoc-githubify\"\u003e\n\u003csection\u003e\n\u003carticle\u003e\n\u003cdiv class=\"container-overview\"\u003e\n\u003cdl class=\"details\"\u003e\n\u003c/dl\u003e\n\u003c/div\u003e\n\u003cdl\u003e\n\u003cdt\u003e\n\u003ch4 class=\"name\" id=\"traceviewify\"\u003e\u003cspan class=\"type-signature\"\u003e\u003c/span\u003etraceviewify\u003cspan class=\"signature\"\u003e(cpuprofile, \u003cspan class=\"optional\"\u003eopts\u003c/span\u003e)\u003c/span\u003e\u003cspan class=\"type-signature\"\u003e \u0026rarr; {Object}\u003c/span\u003e\u003c/h4\u003e\n\u003c/dt\u003e\n\u003cdd\u003e\n\u003cdiv class=\"description\"\u003e\n\u003cp\u003eConverts given cpuprofile object to a trace viewer JSON object.\u003c/p\u003e\n\u003c/div\u003e\n\u003ch5\u003eParameters:\u003c/h5\u003e\n\u003ctable class=\"params\"\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eName\u003c/th\u003e\n\u003cth\u003eType\u003c/th\u003e\n\u003cth\u003eArgument\u003c/th\u003e\n\u003cth class=\"last\"\u003eDescription\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd class=\"name\"\u003e\u003ccode\u003ecpuprofile\u003c/code\u003e\u003c/td\u003e\n\u003ctd class=\"type\"\u003e\n\u003cspan class=\"param-type\"\u003eObject\u003c/span\u003e\n\u003c/td\u003e\n\u003ctd class=\"attributes\"\u003e\n\u003c/td\u003e\n\u003ctd class=\"description last\"\u003e\u003cp\u003eas produced by Chrome DevTools or \u003ca href=\"https://github.com/thlorenz/cpuprofilify\"\u003ecpuprofilify\u003c/a\u003e\u003c/p\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd class=\"name\"\u003e\u003ccode\u003eopts\u003c/code\u003e\u003c/td\u003e\n\u003ctd class=\"type\"\u003e\n\u003cspan class=\"param-type\"\u003eObject\u003c/span\u003e\n\u003c/td\u003e\n\u003ctd class=\"attributes\"\u003e\n\u0026lt;optional\u003e\u003cbr\u003e\n\u003c/td\u003e\n\u003ctd class=\"description last\"\u003e\n\u003ch6\u003eProperties\u003c/h6\u003e\n\u003ctable class=\"params\"\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eName\u003c/th\u003e\n\u003cth\u003eType\u003c/th\u003e\n\u003cth class=\"last\"\u003eDescription\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd class=\"name\"\u003e\u003ccode\u003epid\u003c/code\u003e\u003c/td\u003e\n\u003ctd class=\"type\"\u003e\n\u003cspan class=\"param-type\"\u003enumber\u003c/span\u003e\n\u003c/td\u003e\n\u003ctd class=\"description last\"\u003e\u003cp\u003esets process id\u003c/p\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd class=\"name\"\u003e\u003ccode\u003etid\u003c/code\u003e\u003c/td\u003e\n\u003ctd class=\"type\"\u003e\n\u003cspan class=\"param-type\"\u003enumber\u003c/span\u003e\n\u003c/td\u003e\n\u003ctd class=\"description last\"\u003e\u003cp\u003esets thread id\u003c/p\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd class=\"name\"\u003e\u003ccode\u003ecpu\u003c/code\u003e\u003c/td\u003e\n\u003ctd class=\"type\"\u003e\n\u003cspan class=\"param-type\"\u003enumber\u003c/span\u003e\n\u003c/td\u003e\n\u003ctd class=\"description last\"\u003e\u003cp\u003esets CPU number\u003c/p\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003cdl class=\"details\"\u003e\n\u003cdt class=\"tag-source\"\u003eSource:\u003c/dt\u003e\n\u003cdd class=\"tag-source\"\u003e\u003cul class=\"dummy\"\u003e\n\u003cli\u003e\n\u003ca href=\"https://github.com/thlorenz/traceviewify/blob/master/index.js\"\u003eindex.js\u003c/a\u003e\n\u003cspan\u003e, \u003c/span\u003e\n\u003ca href=\"https://github.com/thlorenz/traceviewify/blob/master/index.js#L12\"\u003elineno 12\u003c/a\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\u003c/dd\u003e\n\u003c/dl\u003e\n\u003ch5\u003eReturns:\u003c/h5\u003e\n\u003cdiv class=\"param-desc\"\u003e\n\u003cp\u003etrace viewer JSON object\u003c/p\u003e\n\u003c/div\u003e\n\u003cdl\u003e\n\u003cdt\u003e\nType\n\u003c/dt\u003e\n\u003cdd\u003e\n\u003cspan class=\"param-type\"\u003eObject\u003c/span\u003e\n\u003c/dd\u003e\n\u003c/dl\u003e\n\u003c/dd\u003e\n\u003c/dl\u003e\n\u003c/article\u003e\n\u003c/section\u003e\n\u003c/div\u003e\n\n*generated with [docme](https://github.com/thlorenz/docme)*\n\u003c/div\u003e\n\u003c!-- END docme generated API please keep comment here to allow auto update --\u003e\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthlorenz%2Ftraceviewify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthlorenz%2Ftraceviewify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthlorenz%2Ftraceviewify/lists"}