文件名称:event-loop-demo
文件大小:3KB
文件格式:ZIP
更新时间:2024-04-05 18:06:41
JavaScript
事件循环演示 设置 生成一个充满随机字符的大文件。 head -c 300000000 < /dev/urandom | base64 > large-file 同步与异步 $ diff compress-async.mjs compress-sync.mjs --- compress-async.mjs 2021-03-16 11:39:21.000000000 -0400 +++ compress-sync.mjs 2021-03-16 11:38:46.000000000 -0400 @@ -27,12 +27,12 @@ const buffer = await fs.readFile('./large-file'); - // Start logging every 100,000th tick. - logTicks(100_000); + // Start logg
【文件预览】:
event-loop-demo-main
----compress-async.mjs(805B)
----jsconfig.json(0B)
----common.mjs(442B)
----README.md(1KB)
----log-ticks.mjs(492B)
----.gitignore(21B)
----package.json(144B)
----compress-sync.mjs(767B)