{"id":20806314,"url":"https://github.com/nodesource/cpu-summarizer-for-datasets","last_synced_at":"2025-06-12T08:05:45.986Z","repository":{"id":247915959,"uuid":"827212556","full_name":"nodesource/cpu-summarizer-for-datasets","owner":"nodesource","description":"Summarize cpu profiles ","archived":false,"fork":false,"pushed_at":"2024-07-15T15:13:02.000Z","size":48,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-12T03:41:34.511Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nodesource.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-11T08:01:43.000Z","updated_at":"2024-07-15T15:13:05.000Z","dependencies_parsed_at":"2025-03-12T03:41:33.847Z","dependency_job_id":"23abcb09-61b8-4936-a781-d7ea65f22cb3","html_url":"https://github.com/nodesource/cpu-summarizer-for-datasets","commit_stats":null,"previous_names":["cesar-m-diaz/summarizer"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nodesource/cpu-summarizer-for-datasets","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodesource%2Fcpu-summarizer-for-datasets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodesource%2Fcpu-summarizer-for-datasets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodesource%2Fcpu-summarizer-for-datasets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodesource%2Fcpu-summarizer-for-datasets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nodesource","download_url":"https://codeload.github.com/nodesource/cpu-summarizer-for-datasets/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodesource%2Fcpu-summarizer-for-datasets/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259426925,"owners_count":22855550,"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-11-17T19:19:16.287Z","updated_at":"2025-06-12T08:05:45.938Z","avatar_url":"https://github.com/nodesource.png","language":"JavaScript","readme":"# CPU Profile Summarizer\n\nThis tool is designed to summarize CPU profiling data for use in generating dataset prompts, providing insights into function execution times and their impact on CPU usage.\n\n## Prerequisites\n\nBefore you can use the CPU Profile Summarizer, ensure you have Node.js installed on your system. You can download and install Node.js from [https://nodejs.org/](https://nodejs.org/).\n\n## Installation\n\nNo installation is required. Simply clone or download the repository containing the tool to your local machine.\n\n## Usage\n\nTo use the CPU Profile Summarizer, follow these steps:\n\n1. Open a terminal or command prompt.\n2. Navigate to the directory containing the `index.js` file of the CPU Profile Summarizer.\n3. Run the tool using Node.js, passing the path to the CPU profile JSON file as an argument:\n\n```bash\nnode index.js \u003cpath-to-cpu-profile.cpuprofile\u003e\n```\n\nReplace \u003cpath-to-cpu-profile.cpuprofile\u003e with the actual path to your CPU profile JSON file.\n\nFor example:\n\n```bash\nnode index.js profiles/myAppProfile.cpuprofile\n```\n\nThe tool will process the CPU profile and generate a summary file in the summaries directory, located in the same directory as index.js. The summary file will be named after the original profile file, with a .summary.jsonl extension.\n\n## Output\n\nThe tool will return the prompt with the data you will only have to add your question and your answer\n\n```jsonl\n{\"messages\":[{\"role\":\"user\",\"content\":\"Given the following CPU profile data: \u003csummary generated by the tool\u003e answer the following question: \u003c your question\u003e\"},{\"role\":\"assistant\",\"content\":\"\u003cHere goes the AI response\u003e\"}]}\n```\n\nThe summary contains the following information:\n\ntopSelfTimeFunctions: Functions with the highest self execution times.\ntopTotalTimeFunctions: Functions with the highest total execution times.\nstartTime: The start time of the profiling session, in seconds.\nendTime: The end time of the profiling session, in seconds.\n\nEach function in the topSelfTimeFunctions and topTotalTimeFunctions lists includes:\n\nfunctionName: The name of the function.\ntotalTime: The total execution time of the function, in seconds.\nhitCount: The number of times the function was executed.\nselfTime: The self execution time of the function, in seconds.\nurl: The URL of the script containing the function.\nselfTimePercentage: The percentage of the highest self time relative to the total profile duration.\ntotalTimePercentage: The percentage of the highest total time relative to the total profile duration.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodesource%2Fcpu-summarizer-for-datasets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnodesource%2Fcpu-summarizer-for-datasets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodesource%2Fcpu-summarizer-for-datasets/lists"}