Measure socket connection time

Discussion in 'Perl Misc' started by Ste, Mar 20, 2006.

  1. Ste

    Ste Guest

    Hi all,

    I've to deploy a (maybe simple) things:

    Just open a socket (host 10.10.10.10 port 15000)

    Measure the time for socket connection, send "quit" and close.

    There's some usefull functions to do it?


    Thanks
    Ste
     
    Ste, Mar 20, 2006
    #1
    1. Advertisements

  2. Ste <stefano@#NOSPAMME#3000.it> wrote in
    news:pan.2006.03.20.13.30.43.617593@#NOSPAMME#3000.it:

    > I've to deploy a (maybe simple) things:
    >
    > Just open a socket (host 10.10.10.10 port 15000)
    >
    > Measure the time for socket connection, send "quit" and close.
    >
    > There's some usefull functions to do it?


    You can use IO::Socket and time.

    Once you have given it a shot, post a short but complete script here if
    you have any problems.

    Sinan
    --
    A. Sinan Unur <>
    (remove .invalid and reverse each component for email address)

    comp.lang.perl.misc guidelines on the WWW:
    http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
     
    A. Sinan Unur, Mar 20, 2006
    #2
    1. Advertisements

  3. Ste

    DJ Stunks Guest

    A. Sinan Unur wrote:
    > Ste <stefano@#NOSPAMME#3000.it> wrote in
    > news:pan.2006.03.20.13.30.43.617593@#NOSPAMME#3000.it:
    >
    > > I've to deploy a (maybe simple) things:
    > >
    > > Just open a socket (host 10.10.10.10 port 15000)
    > >
    > > Measure the time for socket connection, send "quit" and close.
    > >
    > > There's some usefull functions to do it?

    >
    > You can use IO::Socket and time.


    perhaps Time::HiRes? I imagine socket connect time will be well under
    1s...

    -jp
     
    DJ Stunks, Mar 20, 2006
    #3
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. antoine
    Replies:
    2
    Views:
    1,758
    Abhijat Vatsyayan
    Oct 1, 2005
  2. Kathryn Bean
    Replies:
    1
    Views:
    800
    John Harrison
    Oct 28, 2004
  3. Peng Yu
    Replies:
    7
    Views:
    526
    Anoop Aryal
    Mar 29, 2005
  4. Girish Sahani

    How to measure execution time of a program

    Girish Sahani, Jun 28, 2006, in forum: Python
    Replies:
    0
    Views:
    447
    Girish Sahani
    Jun 28, 2006
  5. flamesrock
    Replies:
    8
    Views:
    807
    Hendrik van Rooyen
    Nov 24, 2006
  6. Helene Unterwieser
    Replies:
    14
    Views:
    4,291
    Esmond Pitt
    Jul 3, 2007
  7. Laszlo Nagy
    Replies:
    1
    Views:
    7,186
    Mark Wooding
    Jan 27, 2009
  8. Steve Holden
    Replies:
    1
    Views:
    997
Loading...