in reply to "deep" unit testing

I'm literally headed out the door to go out and tune/prep my boat motors so I can drop my boats out in the water this weekend, so I don't have time to review thoroughly or respond properly until later. That said, in response to this:

"...cause he is very critical about performance and doesn't want the overhead of extra sub calls."

...I call that ridiculous horse shit (or laziness, take your pick, but I don't think the "Lazy" that Perl implies relates to such a situation).

Replies are listed 'Best First'.
Re^2: "deep" unit testing
by LanX (Saint) on Mar 27, 2019 at 20:46 UTC
    Well sub calls in Perl are expensive. *

    I don't know the special case though.

    and since it's legacy code this approach might bring better results than trying to refactor hundreds of time critical night jobs.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

    update

    *) see also RFC: Inline::Blocks or inline as a keyword?

      Can you elaborate a bit on what we're talking about in regards to timing? 5ms, 100ms etc?

      Can you also explain in a bit more detail the nature of what is being tested? No need to go to extremes here, just enough so we have a better idea of the why regarding such time-sensitive (and non-additive-to-codebase) testing.

      Is mocking out pieces of specific tests an option? Do you store data externally so that you can test against it so timing isn't so critical?

        ( Oh you have internet on your boat in the wild??? ;-P )

        No I can't.

        Communication is hard and I had to come up with a self contained example.

        Enough to tell that these are extensive ETL operations shuffling and transforming trillions of data sets each night.

        And I'm not going to tell my client that his code base of the last 20 years is "horse shit". *

        The case is still interesting as such: What is the best approach for deep unit testing?

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

        *) at least not on a daily basis ;-)