SUPER_OLEG_DEV Telegram 223
Одна из классных идей в новой 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/223
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/223

View MORE
Open in Telegram


Telegram News

Date: |

In the “Bear Market Screaming Therapy Group” on Telegram, members are only allowed to post voice notes of themselves screaming. Anything else will result in an instant ban from the group, which currently has about 75 members. During a meeting with the president of the Supreme Electoral Court (TSE) on June 6, Telegram's Vice President Ilya Perekopsky announced the initiatives. According to the executive, Brazil is the first country in the world where Telegram is introducing the features, which could be expanded to other countries facing threats to democracy through the dissemination of false content. Don’t publish new content at nighttime. Since not all users disable notifications for the night, you risk inadvertently disturbing them. Unlimited number of subscribers per channel But a Telegram statement also said: "Any requests related to political censorship or limiting human rights such as the rights to free speech or assembly are not and will not be considered."
from us


Telegram SuperOleg dev notes
FROM American