[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Transfer rate computations for Mnemonic
Garrett,
The ReadNonBlock() function will be used for the real mnemonic
-- in the FetchURL() call (not the FetchURL_b() call which was what we
initially used -- but we are moving over to the FetchURL() call). It
would be good if you could create a message type for transfer speed
updates -- this could fit in well if we provided for some mechanism for
something to be called every n seconds, or m times a second, or whatever.
Aside from providing timed updates to transfer status, I think we will
eventually need that sort of mechanism for things like JavaScript and
Java. I don't know the best way to go about doing that. Anyone on the
list want to do this?
To create a new message type, just check out how the StatusMessage and
stuff are created.
No ideas on how long a stalled connection should be -- but perhaps
something below 0.1 kB/sec... I don't see any real reason to do stall
detection, except that netscape does it.
As for debug() calls, you do ./mnemonic -dDEBUGCLASS where DEBUGCLASS is
TCP for the TCPConnection, and is whatever else where you have the #define
DEBUGCLASS NAME.
Andrew
On Sat, 7 Jun 1997, Garrett Smith wrote:
> Andrew,
> I have started work on calculating speeds on file transfers. Currently
> I have a basic computation in the TCPConnection::ReadBlock() call. The
> way to get the speed is through the GetSpeed() call from the Stream
> class.
> It seems that only ReadBlock() is used right now, not ReadNonBlock, is
> this going to change, if so should I work on adding speed calculation
> there.
> The other question I had was on stall detection. I assume that you
> declare it stalled if no data is received for a certian period of time.
> My question is is there a standard length of time. Any ideas on
> implementing this?
> The actual speed computations give transfer rates slightly higher than
> I would expect but maybe its because I am reading from my local
> machine. The equasion looks right but you might want to give it a look.
> I also probably need to add some kind of averaging so the speed given
> doesn't depend so much on exactly when the ui got the speed. Right now
> the speed is just for the previous read.
> I am very open to comments on the design and location of the code.
>
> Garrett Smith
> gsmith@univprep.pvt.k12.wa.us
>
> PS. How do you get the debug function to print? Lets say I wanted all
> the debug messages in TCPConnection::ReadBlock() to be printed. How
> would I do this. I have tried calling mnemonic with the
> -dTCPConnection::ReadBlock flag and the -dTCPConnection flag but nothing
> happens.
>