Light Speed Socket Connections

Skip Montanaro skip at pobox.com
Thu Jul 12 16:49:31 CEST 2001


    Bengt> On 11 Jul 2001 22:32:16 -0700, tangell at kicker.com (T Angell) wrote:
    >> I wrote some code to test how long it takes to make socket connections
    >> and ran it against several hosts around the world, here are some
    >> sample times:
    >> 
    >> socket time: 0.0047459602356
    >> socket time: 0.00469899177551
    >> socket time: 0.00404000282288
    >> socket time: 0.00537407398224
    >> 
    Bengt> [...]
    >> t1 = time.time()
    Bengt> For accurate timing, time.clock() is recommended, I believe:
    ...

Not in this case.  He wants to know how long it takes the socket to be
connected between the two machines.  That is an elapsed time sort of thing,
what you measure with time.time.  It has little or nothing to do with the
CPU time used by the client process making the connection.

-- 
Skip Montanaro (skip at pobox.com)
(847)971-7098




More information about the Python-list mailing list