mscdex / busboy

A streaming parser for HTML form data for node.js
MIT License
2.84k stars 213 forks source link

How to run benchmarks for busboy? #361

Closed mjackson closed 1 month ago

mjackson commented 1 month ago

I'm trying to run the benchmarks for busboy, but I can't seem to get any output in the console. The benchmarks for multiparty and formidable run just fine, but when I do:

$ node ./bench/bench-multipart-fields-100mb-small.js busboy

from the repo root, I don't get any output in the console. I tried messing with the script and doing a console.log(calls) in the busboy section, but it looks like the close event is never actually fired so the console.timeEnd call never happens. Feels like I'm missing something obvious.

Is this just me?

mjackson commented 1 month ago

I should have also mentioned, I'm on node 20.15.1

mjackson commented 1 month ago

Ah, it looks like if I add a call to parser.end() after pushing all the buffers into the parser it works and I get the close event. I'll submit a PR.