SUPER_OLEG_DEV Telegram 224
Одна из классных идей в новой CLI - кастомные трейсы в формате Trace Event Format

Идея взята у Parcel, Rspack и Next.js, примеры:
- https://parceljs.org/features/profiling/#tracing
- https://github.com/parcel-bundler/parcel/blob/v2/packages/core/profiler/src/Tracer.js
- https://rspack.dev/contribute/development/tracing

Написал кастомный трейсер поверх либы chrome-trace-event, пример API:

const tracer = new Tracer();

tracer.wrap({ event: 'event' }, async () => {
await doSomethingAsync();
});


Во вложении пример визуализации кастомного трейса на сборку и несколько ребилдов, в интерфейсе https://ui.perfetto.dev/. Очень удобно смотреть сколько времени занимают основные операции, какие блокируют друг друга, где произошла ошибка (трейсы пишутся на диск не в конце а все время жизни скрипта)

В идеале - еще собирать более подробные трейсы по сборке через хуки бандлера.
🔥9



tgoop.com/super_oleg_dev/224
Create:
Last Update:

Одна из классных идей в новой CLI - кастомные трейсы в формате Trace Event Format

Идея взята у Parcel, Rspack и Next.js, примеры:
- https://parceljs.org/features/profiling/#tracing
- https://github.com/parcel-bundler/parcel/blob/v2/packages/core/profiler/src/Tracer.js
- https://rspack.dev/contribute/development/tracing

Написал кастомный трейсер поверх либы chrome-trace-event, пример API:

const tracer = new Tracer();

tracer.wrap({ event: 'event' }, async () => {
await doSomethingAsync();
});


Во вложении пример визуализации кастомного трейса на сборку и несколько ребилдов, в интерфейсе https://ui.perfetto.dev/. Очень удобно смотреть сколько времени занимают основные операции, какие блокируют друг друга, где произошла ошибка (трейсы пишутся на диск не в конце а все время жизни скрипта)

В идеале - еще собирать более подробные трейсы по сборке через хуки бандлера.

BY SuperOleg dev notes





Share with your friend now:
tgoop.com/super_oleg_dev/224

View MORE
Open in Telegram


Telegram News

Date: |

Content is editable within two days of publishing In handing down the sentence yesterday, deputy judge Peter Hui Shiu-keung of the district court said that even if Ng did not post the messages, he cannot shirk responsibility as the owner and administrator of such a big group for allowing these messages that incite illegal behaviors to exist. The group’s featured image is of a Pepe frog yelling, often referred to as the “REEEEEEE” meme. Pepe the Frog was created back in 2005 by Matt Furie and has since become an internet symbol for meme culture and “degen” culture. As of Thursday, the SUCK Channel had 34,146 subscribers, with only one message dated August 28, 2020. It was an announcement stating that police had removed all posts on the channel because its content “contravenes the laws of Hong Kong.”
from us


Telegram SuperOleg dev notes
FROM American