Proposal: some improvements, and how to track them

Đang mở
#9 5 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
12/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Sôi nổi
Công nghệ
nodejs, typescript
Lĩnh vực
cli, devtools

Hướng nghiên cứu

This is a maintainer-approval proposal, not a single task, so do not start a patch from it. Before any work, the maintainer needs to agree on which items to take and how to split them. The items name the insights, navigations, tasks, profile and scan commands, and scan uses fs.globSync. A useful first step is to reproduce one of the listed bugs and ask in the thread which item to pick.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Hi @jackfranklin,

I've been using trace-engine-cli and spent some time going through the codebase. I have a list of possible improvements. Before opening a batch of issues, I'd like to check which ones make sense to you and how you prefer to handle them.

Bugs (reproduced locally)
  • insights and navigations silently ignore --time-range. The option is global, so both commands accept it and return data for the full trace.
  • insights reports navigationId: null even when it uses the first InsightSet.
  • Numeric options are not validated. tasks --top -5 and profile --bucket 0 return empty results with exit code 0, which an agent reads as "nothing found".
  • scan silently skips files it cannot decompress or parse. With a directory containing one valid trace, one truncated .json and one corrupt .json.gz, scan <dir> --grep RunTask reports totalFilesScanned: 3, totalFilesMatched: 1 and exits 0 with no warning, so a broken file looks the same as a file with no matches.
Features
  • compare <baseline> <candidate>: compare two traces (CWV deltas and rating changes, main thread busy time, long tasks, top function regressions). Useful for before/after checks on a PR.
  • Cover more insight models. insights exposes 5 of the 19 models in the engine (ForcedReflow, DOMSize, LCPDiscovery, DocumentLatency, ImageDelivery and FontDisplay are missing, among others). Exposing state and metricSavings would also help agents prioritize.
  • --format json, and possibly stdin input and --fail-on thresholds for CI.
Tests and infra
  • Add a small real Chrome trace with snapshot tests. All fixtures are synthetic, and Dependabot bumps @paulirish/trace_engine daily, so a change in the engine's output shape could still pass CI.
  • Add "engines": { "node": ">=22" }. scan uses fs.globSync, which is not available in Node 20.
Docs
  • A section on how to record a compatible trace (DevTools, Puppeteer, chrome-devtools-mcp).

Would it be OK if I open one issue per item (or only for the ones you're interested in), and then send a PR for each once we agree on the approach in the issue? If you'd prefer to skip some of these or handle them differently, just let me know.

Thanks!

Ngôn ngữ chính
TypeScript
Star
15
Fork
4
Merge trung bình
1 ngày 17 giờ
Pull request đã merge (30 ngày)
22

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ChromeDevTools/trace-engine-cli

Tất cả issue của ChromeDevTools/trace-engine-cli

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.