Okay, now I feel stupid. Thank you for your response. I was able to test and confirm that the stream.Transform and Passtrough DO emit an end event (and all other relevant events). Not sure yet what is wrong with my application code, but I'll find out tomorrow.
I think that the code in the SO answer<http://stackoverflow.com/questions/15413664/how-to-benchmark-node-js-streams/15521845#15521845> misses a call to `done` in the Uppercase._transform tough, so that might be a reason stuff went wrong (I might have used that as a base for the test) On Sunday, April 14, 2013 1:59:31 AM UTC+2, Dan Milon wrote: > > You're explicitly asking it not to emit an end event by passing end: false > to pipe. > > On 14 Απρ 2013, at 12:01 π.μ., Ruud <[email protected] <javascript:>> > wrote: > > Hey, > > I'm trying to create a streaming parser/transformer for a special web > proxy project. The 'streams2' stream.Transform base class makes this quite > easy, but trying to benchmark some thing I've hit a problem: it seems no > (end) events are emitted. > > The docs don't list any events under this class explicitly, but one > would imagine the events from the stream.Readable and stream.Writable are > also implemented in stream.Transform. > > My question: Am I doing something wrong, is this by design, or could this > be considered a bug? > > Al I could find on the subject is this Stack Overflow > question<http://stackoverflow.com/questions/15413664/how-to-benchmark-node-js-streams>+ > > comment<http://stackoverflow.com/questions/15413664/how-to-benchmark-node-js-streams#comment22025481_15521845> > > Code (more or less): > >> stream = require('stream'); >> function Parser (options) { >> if (!(this instanceof Parser)) return new Parser(options); >> stream.Transform.call(this, options); >> this.options = options || {}; >> } >> util.inherits(Parser, stream.Transform); >> Parser.prototype._transform = function(chunk, encoding, done) { >> // magic stuff that transforms chunk >> this.push(chunk); >> done(); >> }; >> >> parser = new Parser(); >> parser.on('end', function () { >> console.log('This will never happen ???'); >> }); >> req.pipe(parser, {end: false}).pipe(res); > > > > > -- > -- > Job Board: http://jobs.nodejs.org/ > Posting guidelines: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > You received this message because you are subscribed to the Google > Groups "nodejs" group. > To post to this group, send email to [email protected] <javascript:> > To unsubscribe from this group, send email to > [email protected] <javascript:> > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en > > --- > You received this message because you are subscribed to the Google Groups > "nodejs" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] <javascript:>. > For more options, visit https://groups.google.com/groups/opt_out. > > > > -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
