{"id":19369740,"url":"https://github.com/xtermjs/chrome-timeline","last_synced_at":"2025-04-23T15:31:44.569Z","repository":{"id":33081623,"uuid":"150003268","full_name":"xtermjs/chrome-timeline","owner":"xtermjs","description":"Write performance tests and get timeline profiling data from puppeteer.","archived":false,"fork":false,"pushed_at":"2023-10-16T18:17:37.000Z","size":504,"stargazers_count":14,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-21T01:44:14.983Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/xtermjs.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":"2018-09-23T16:30:14.000Z","updated_at":"2024-08-14T14:11:30.000Z","dependencies_parsed_at":"2024-06-21T02:29:17.972Z","dependency_job_id":null,"html_url":"https://github.com/xtermjs/chrome-timeline","commit_stats":{"total_commits":44,"total_committers":2,"mean_commits":22.0,"dds":0.2954545454545454,"last_synced_commit":"a2526880945b0c0aae016178dea924f4cf355e01"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtermjs%2Fchrome-timeline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtermjs%2Fchrome-timeline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtermjs%2Fchrome-timeline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtermjs%2Fchrome-timeline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xtermjs","download_url":"https://codeload.github.com/xtermjs/chrome-timeline/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250460454,"owners_count":21434252,"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-10T08:13:14.127Z","updated_at":"2025-04-23T15:31:44.268Z","avatar_url":"https://github.com/xtermjs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## chrome-timeline\n\nWrite performance tests and get the timeline profiling data from puppeteer (chromium).\n\n### Example:\n```js\nconst timeline = require('chrome-timeline').timeline;\n\ntimeline(async (runner) =\u003e {\n  // load something in chromium\n  await runner.page.goto('https://example.com');\n  // start a timeline profiling\n  await runner.tracingStart('TRACE_ABC');\n  // do something in the remote page\n  await runner.remote((done, window) =\u003e {\n    // this is within remote browser context\n    some_heavy_stuff_to_be_measured();\n    // call done when finished (sync variant)\n    done();\n    // or async example with setTimeout\n    setTimeout(done, 10000);\n  });\n  // stop the profiling\n  await runner.tracingStop();\n});\n```\n\nBy default `timeline` does a clean startup of a remote puppeteer chromium client,\nruns the provided callback and exists the client afterwards.\nThis behavior can be changed by providing custom options (e.g. connecting to a running remote instance).\n`timeline` returns a promise containing summaries of tracings that were done denoted\nby the name (`'TRACE_ABC'` in the example).\n\n### Tracing start default options\n```js\ntracingStartOptions: {\n  // path to trace file export (default: no file written)\n  path: null,\n  // whether the trace should contain screenshots\n  screenshots: true,\n  // profiling categories chrome understands\n  categories: [\n    '-*',\n    'v8.execute',\n    'blink.user_timing',\n    'latencyInfo',\n    'devtools.timeline',\n    'disabled-by-default-devtools.timeline',\n    'disabled-by-default-devtools.timeline.frame',\n    'toplevel',\n    'blink.console',\n    'disabled-by-default-devtools.timeline.stack',\n    'disabled-by-default-devtools.screenshot',\n    'disabled-by-default-v8.cpu_profile',\n    'disabled-by-default-v8.cpu_profiler',\n    'disabled-by-default-v8.cpu_profiler.hires'\n  ]\n}\n```\n\n### Tracing end default options\n```js\ntracingEndOptions: {\n  // save trace under timeline/\u003cepoch\u003e/runnerId_\u003cepoch\u003e.trace\n  saveTrace: false,\n  // create a summary of trace data, also saved if saveTrace=true\n  createSummary: true,\n  // report uncommitted changes for current git branch in summary\n  reportUncommittedChanges: false,\n}\n```\n\n### Summary\n\nSummaries are returned by `timeline` for a single tracing, if `tracingEndOptions.createSummary=true`.\nThey contain various useful stats from a trace for further postprocessing:\n\n```js\nexport interface ISummary extends IPostProcess {\n  // path to trace flie the summary belongs to (empty if tracingEndOptions.saveTrace=false)\n  traceFile: string;\n  // name of the trace as given to .tracingStart(name)\n  traceName: string;\n  // additional git repo stats (contains {isRepo: false} for non git repo projects)\n  repo: IRepoInfo;\n  // puppeteer profiling metadata (e.g. hardware setup, env data, cmdline)\n  metadata: {[key: string]: any};\n  // profiling summary as shown in the pie chart in devtools\n  summary: {[key: string]: number};\n  // top down tree events\n  topDown: IEvent[];\n  // bottom up tree events\n  bottomUp: IEvent[];\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxtermjs%2Fchrome-timeline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxtermjs%2Fchrome-timeline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxtermjs%2Fchrome-timeline/lists"}