8ea2533620
Timing impact. Before (numbers from my Mac): $ node tools/timechild.js Time `log.child`: - adding no fields: 0.01307ms per iteration - adding one field: 0.01336ms per iteration - adding two fields: 0.0134ms per iteration - adding serializer and one field: 0.01839ms per iteration - adding a (stderr) stream and one field: 0.01905ms per iteration - [fast] adding no fields: 0.000821ms per iteration - [fast] adding one field: 0.001067ms per iteration - [fast] adding two fields: 0.00122ms per iteration After: $ node tools/timechild.js Time `log.child`: - adding no fields: 0.01243ms per iteration - adding one field: 0.01345ms per iteration - adding two fields: 0.01343ms per iteration - adding serializer and one field: 0.01671ms per iteration - adding a (stderr) stream and one field: 0.01915ms per iteration - [fast] adding no fields: 0.001742ms per iteration - [fast] adding one field: 0.00193ms per iteration - [fast] adding two fields: 0.002388ms per iteration I.e., not great, but still 5x faster for the "fast child" path. |
||
---|---|---|
.. | ||
bunyan.js |