Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

I have started to realise that this is a HUGE subject, with poeple devoting much of their time to comparing languages in shootouts etc. for performance gains.

My requirement is not as vast. What got me started down this line is a real issue I am currently experiencing.

I have script that reads a dir for files, when files are found it connects to a server and moves these files over the socket to the server. When I (using a test script) put a file into the watched dir I notice that the memory for this client process(which has been compiled using perl2exe) increases but then stays pretty static. I can actually send about 100 files in a few seconds and still see no increase in memory utilisation. However when I send 200 files the momory jumps again. The problem is that it doesn't release this memory.

I am currently using Devel::Size to test which of my vars/arrays/hashes etc are growing, but have to date not found where my problem is. I am also looking at putting Benchmark::Timer to use.

This really leads me to my current musing...

  • Should I start building test/benchmark code into my future scripts for debugging purposes..?
  • What do other monks do for benchmarking/testing their scripts?
  • When do you reach the point of "OK, this has too many tests"?
  • What other metrics do you measure (I.e. speed, memory)?
  • -----
    Of all the things I've lost in my life, its my mind I miss the most.

    In reply to Benchmark testing by AcidHawk

    Title:
    Use:  <p> text here (a paragraph) </p>
    and:  <code> code here </code>
    to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others lurking in the Monastery: (4)
    As of 2021-04-13 22:20 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found

      Notices?