microsoft / microsoft/typescript-analyze-trace

request: something like `--watch` mode

Open
#32 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
429
Forks
23
PR merge metrics
No merged PRs in 30d

Description

It would be helpful if there was something like --watch mode, or documentation for how to do this.

Example workflow:

  1. We run analyze-trace ts-trace
  2. Oh look, a hot spot!
Analyzed /Users/dylang/project/packages/example/tsconfig.json (trace.65458-188.json)
Hot Spots
└─ Check file /Users/dylang/project/packages/example/slow-type-in-here.js (1739ms)
   └─ Check variable declaration from (line 57, char 7) to (line 62, char 2) (1441ms)
      └─ Check expression from (line 57, char 30) to (line 62, char 2) (1441ms)
         └─ Check expression from (line 57, char 30) to (line 57, char 52) (1438ms)
            └─ Compare types 13361 and 4729 (1249ms)

  1. We make a change to try to fix it, and hit save....

This is where this feature request starts.

  1. analyze-trace automatically runs again. Fewer files may need to be recompiled so analyze-trace is only showing results from those re-compiles. Feature Request
  2. The output from analyze-trace tells us how much faster or slower each change is compared to the previous run. Bonus Feature Request

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the analyze-trace CLI entry point and trace-analysis workflow, then reproduce the example using a generated TypeScript trace. Done means a watch mode reruns analysis after a file save and reports the requested results; compare-against-previous-run output is an explicitly marked bonus request.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli, performance
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.