CLI
Profiling
Set TIMING, as with ESLint, to see where the time goes. The table is
written to stderr, so the lint results on stdout are unchanged and
-f json stays parseable.
Output for typescript-eslint recommendedTypeChecked on date-fns (1,228
files), trimmed to the slowest five rules and adapter entries:
The first three columns match ESLint's TIMING table. The rest split each
rule's time:
The last table lists the adapter's busiest entries: property reads
(get node.initializer), checker or object methods
(checker.getTypeAtLocation) and wrap, each with its calls and average
cost.
Reading the example: no-misused-promises spends more time in the adapter
than in its own logic, and its many small requests cost about as much to move
across as the checker spends answering them. In the adapter, get node.initializer averages 1.42 µs per read against 0.08 µs for get type.flags, which points at that read as the one to look at. See Profiling rules for every
column, phase and the JSON output.
