Re: faking time() across processes for testing

2007-06-29 Thread Joshua ben Jore
On 6/29/07, A. Pagaltzis <[EMAIL PROTECTED]> wrote: * Joshua ben Jore <[EMAIL PROTECTED]> [2007-06-29 05:35]: > I had a terrible and powerful idea just now. Use Runops::Trace When all you have^W^W^W you newly discover the hammer… That's it exactly. "I've got this neat tool. What can I use it t

Re: faking time() across processes for testing

2007-06-29 Thread A. Pagaltzis
* Joshua ben Jore <[EMAIL PROTECTED]> [2007-06-29 05:35]: > I had a terrible and powerful idea just now. Use Runops::Trace When all you have^W^W^W you newly discover the hammer… -- *AUTOLOAD=*_;sub _{s/(.*)::(.*)/print$2,(",$\/"," ")[defined wantarray]/e;$1} &Just->another->Perl->hack; #Aristotl

Re: faking time() across processes for testing

2007-06-28 Thread Chris Dolan
On Jun 28, 2007, at 10:30 PM, Joshua ben Jore wrote: I had a terrible and powerful idea just now. Use Runops::Trace to provide op-level synchronization points. You could have N threads or processes all doing their individual ops (or statements if you prefer that granularity) in an order that you

Re: faking time() across processes for testing

2007-06-28 Thread Joshua ben Jore
On 6/28/07, David Golden <[EMAIL PROTECTED]> wrote: On 6/28/07, Eric Wilhelm <[EMAIL PROTECTED]> wrote: > I was thinking there needs to be a shared filehandle with a stream of > time on it similar to the below, but with various time() and sleep() > methods overridden. Calls to time() or sleep()

Re: faking time() across processes for testing

2007-06-28 Thread David Golden
On 6/28/07, Eric Wilhelm <[EMAIL PROTECTED]> wrote: I was thinking there needs to be a shared filehandle with a stream of time on it similar to the below, but with various time() and sleep() methods overridden. Calls to time() or sleep() would peel-off lines, thus keeping everyone in sync. It b

faking time() across processes for testing

2007-06-28 Thread Eric Wilhelm
Thoughts? I can override CORE::GLOBAL::time() and I've done this before with a closure (ala Time::Mock), but how would one implement accelerated time for testing a multi-process program? I'm also dealing with possibly sleep(), alarm() and other timing issues, as well as maybe Time::HiRes::tim