Meanwhile, I've updated the code and implemented another flag, SEQUENTIAL. With this flag, packet N+1 will only be sent to the server after packet N has been received. With this flag enabled you will better grasp what I'm experiencing - sequential mode has equal global and per-packet averages, while on non-sequential mode this doesn't happen.
The update file is at http://bruno.factor45.org/LifetimeIssues.java I'll try to dig into MINA's code and see what I can come up with. Best regards, Bruno On Fri, Jul 24, 2009 at 3:18 PM, Christopher Popp<[email protected]> wrote: > Hello, > >>> Speaking in numbers, executing the test multiple times, I get a constant >>> global average of ~1ms lifetime, but individual lifetime measurement >>> averages ranges 40~80ms. > > > > I downloaded your code and gave it a run...it printed out the following with > the defaults (no sleep). > > [SERVER] Binding Server to localhost/127.0.0.1:20002 TCP > [SERVER] Bound to localhost/127.0.0.1:20002 > [SERVER] Session created: /127.0.0.1:2598 > [CLIENT] Session created: localhost/127.0.0.1:20002 > [CLIENT] Session opened: localhost/127.0.0.1:20002 > [CLIENT] Connected to server, sending message. > [SERVER] Session opened: /127.0.0.1:2598 > [SERVER] Test completed, took 63ms to receive 100 packets (63ms after > sleep discounts). > [SERVER] Calculated average lifetime was 00.63ms. > [SERVER] Individual average lifetime was 3.03ms. > [CLIENT] Session closed: localhost/127.0.0.1:20002 > [SERVER] Session closed: /127.0.0.1:2598 > [SERVER] Received a total of 5300b > > Maybe I am missing something, but it seems pretty reasonable to me. I ran it > under Windows XP on a laptop with a dual core processor. > > Chris > > >
