Consider timing diagnostics and adapters for slow repeated CLI startup

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

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
35/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Ít trao đổi
Công nghệ
node.js, typescript
Lĩnh vực
cli, performance, testing-qa

Hướng nghiên cứu

Issue không nêu tên file hoặc test nào. Trước tiên, hãy tái hiện một suite gồm các lệnh được lặp lại và so sánh thời gian khởi động với overhead của việc đối sánh output; sau đó xác định một hướng—chẩn đoán timing, tài liệu hoặc một adapter. Phần hoàn tất phải bao gồm hướng dẫn hoặc chẩn đoán rõ ràng, đồng thời giữ nguyên argv, cwd, môi trường, streams và hành vi exit-code đối với mọi adapter.

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

Mô tả

Some CLI golden suites run the same command many times, and for TypeScript/Node CLIs a
single cold start can be around a second. When a tryscript file or suite has many console
blocks, that startup cost can dominate the run even when tryscript's own matching overhead
is small.

It would be useful to consider support or guidance here without changing tryscript's core
shell semantics.

Possible directions:

  • Document how to diagnose startup-bound suites versus output-matching overhead.
  • Add optional timing diagnostics, such as per-command duration and a slowest-commands
    summary.
  • Provide guidance for CLI authors on reducing startup cost: lazy imports, prebuilt JS,
    Node compile cache, avoiding heavy barrel imports, etc.
  • Consider an advanced adapter/lifecycle pattern for CLIs that can safely run multiple
    invocations through one prestarted process while preserving argv, cwd, env, stdin,
    stdout/stderr, and exit-code behavior.

The adapter idea is not universally safe because many CLIs rely on process isolation or
global state. Even if tryscript does not implement daemonization directly, docs and timing
visibility would help users see where slow golden tests are spending time and choose the
right mitigation.

Ngôn ngữ chính
TypeScript
Star
13
Fork
1
Merge trung bình
3 giờ 38 phút
Pull request đã merge (30 ngày)
3

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

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 jlevy/tryscript

Tất cả issue của jlevy/tryscript

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.