Le lundi 17 juillet 2006 à 11:01 -0400, Alex Karasulu a écrit :
> Julien Vermillard wrote:
> > Hi all,
> > 
> > Actualy it's very easy to calculate bytes thoughput (read and write) by
> > looking in the IoSession objects and using the following methods :
> > 
> >  long getReadBytes() 
> >           Returns the total number of bytes which were read from this
> > session.
> > 
> >  long getWrittenBytes() 
> >           Returns the total number of bytes which were written to this
> > session.
> > 
> > But for PDU encoding/decoding performance there is nothing, actualy.
> > 
> > I would like to add the following methods : 
> >    long getReadPDU();
> >    long getWrittenPDU(); 
> > 
> > I'm thinking about adding them in mina.filter.codec.ProtocolCodecFilter.
> > 
> > The total count of encoded PDU will be done in ProtocolCodecFilter, but
> > for the count of decoded PDU I'm thinking about the interface
> > ProtocolDecoderOutput (implemented in SimpleProtocolDecoderOutput).
> 
> Hmmm so mina can make use of the protocol codec to determine when it 
> should increment the PDU's read and written?
> 
> Meaniing it can make the decoders and encoders tell it when the 
> demarcations between PDUs occurs?
> 
> Alex
> 

Decoders call "ProtocolDecoderOutput.write(Object pdu)" each time a PDU
is decoded so MINA can increment "PDU read count" each time this method
is called (for a session)

encoders gets PDUs from ProtocolEncoder.encode(Object pdu) so MINA can
increment the "PDU write count" each time ProtocolDecoderFilter call
this method for a session.


Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to