Skip to content

Conversation

lukekarrys
Copy link
Contributor

BREAKING CHANGE: --timing file changes:

  • When run with the --timing flag, npm now writes timing data to a
    file alongside the debug log data, respecting the logs-dir option and
    falling back to the cache dir, instead of directly inside .npm/.
  • The timing file data is no longer newline delimited JSON, and instead
    each run will create a uniquely named <ID>-timing.json file, with the
    <ID> portion being the same as the debug log.
  • Finally, the data inside the file now has three top level keys,
    metadata, timers, and unfinishedTimers` instead of everything being
    a top level key.

Closes npm/statusboard#456

@lukekarrys lukekarrys requested a review from a team as a code owner September 23, 2022 21:14
@npm-cli-bot
Copy link
Collaborator

npm-cli-bot commented Sep 23, 2022

found 20 benchmarks with statistically significant performance improvements

  • app-large: clean, lock-only, cache-only, cache-only:peer-deps, modules-only, no-lock, no-cache, no-modules, no-clean, no-clean:audit
  • app-medium: clean, lock-only, cache-only, cache-only:peer-deps, modules-only, no-lock, no-cache, no-modules, no-clean, no-clean:audit
timing results
app-large clean lock-only cache-only cache-only
peer-deps
modules-only no-lock no-cache no-modules no-clean no-clean
audit
npm@8 53.910 ±2.08 21.157 ±0.00 19.128 ±0.10 24.089 ±3.99 3.501 ±0.00 3.495 ±0.01 2.918 ±0.07 13.320 ±0.06 2.795 ±0.01 3.949 ±0.02
#5581 0.127 ±0.00 0.132 ±0.01 0.128 ±0.00 0.127 ±0.00 0.129 ±0.00 0.128 ±0.00 0.127 ±0.00 0.128 ±0.00 0.129 ±0.00 0.131 ±0.00
app-medium clean lock-only cache-only cache-only
peer-deps
modules-only no-lock no-cache no-modules no-clean no-clean
audit
npm@8 34.527 ±1.86 16.484 ±0.19 15.030 ±0.02 16.056 ±0.69 3.191 ±0.01 3.179 ±0.00 2.901 ±0.05 10.150 ±0.02 2.720 ±0.03 3.667 ±0.07
#5581 0.128 ±0.00 0.129 ±0.00 0.128 ±0.00 0.128 ±0.00 0.130 ±0.00 0.128 ±0.00 0.129 ±0.00 0.129 ±0.00 0.135 ±0.00 0.128 ±0.00
BREAKING CHANGE: `--timing` file changes: - When run with the `--timing` flag, `npm` now writes timing data to a file alongside the debug log data, respecting the `logs-dir` option and falling back to `<CACHE>/_logs/` dir, instead of directly inside the cache directory. - The timing file data is no longer newline delimited JSON, and instead each run will create a uniquely named `<ID>-timing.json` file, with the `<ID>` portion being the same as the debug log. - Finally, the data inside the file now has three top level keys, `metadata`, `timers, and `unfinishedTimers` instead of everything being a top level key. Closes npm/statusboard#456
Also refactor all files written to the logs directory to use the same code path for file name creation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants