[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

ruby-prof for WATIR testcase calls WIN32OLE#method_missing

Sandeep Gupta

6/9/2009 1:23:00 PM

Hi all,

I generated ruby profile for my test suite. In my profile i observed
that 10% of my test time is taken by WIN32OLE#method_missing. It was
called 60077 times.

Can anyone please help me understand when and why it is getting called.
Is there any way to optimize it ?

I'm using
ruby 1.8.4
watir 1.5.1.1192
ruby-prof 0.7.3

I'm attaching my generated ruby graph profile.

Thanks,
Sandeep

Attachments:
http://www.ruby-...attachment/3798/p...

--
Posted via http://www.ruby-....

3 Answers

Heesob Park

6/9/2009 2:21:00 PM

0

Hi,

2009/6/9 Sandeep Gupta <sandeep.gupta@subexworld.com>:
> Hi all,
>
> I generated ruby profile for my test suite. In my profile i observed
> that 10% of my test time is taken by WIN32OLE#method_missing. It was
> called 60077 times.
>
> Can anyone please help me understand when and why it is getting called.
> Is there any way to optimize it ?
>
That is the way WIN32OLE work. All properties and methods pass through
method_missing.

The C code can be written with Ruby code like this:

def method_missing(id,*args)
method = id.to_s
if method[-1] == ?=
method = method[0..-2]
return ole_propertyput(method,args.first)
else
return ole_invoke(method, args, DISPATCH_METHOD|DISPATCH_PROPERTYGET, false)
end
end



Regards,
Park Heesob

Billy

10/18/2011 4:14:00 PM

0

On Oct 18, 12:10 pm, marcus <marcus...@yahoo.com> wrote:
> On Oct 18, 11:46 am, Billy <billybartlet...@yahoo.com> wrote:
>
> > On Oct 17, 7:35 pm, Mack A. Damia  <mybaconbu...@hotmail.com> wrote:
>
> > >http://mashable.com/2011/10/17/herman-cain-singin...
>
> > I think Cain's in the midst of HIS 15  minutes.  The R. nominee will
> > be Romney.  Which is interesting, given that he's the most moderate
> > contender in the lot, except for Huntsman, who never even got five
> > minutes.
>
> > There was a great joke about Romney from Bill Maker the other night.
> > "The dofferencebetween Romney and a member of a cult is that a member
> > of a cult BELIEVES things." (A reference to Romney's tendency to
> > change his position.)
>
> There is no doubt that Romney will be the nominee.

I'm quite sure of it, but there's some doubt. Someone on MSNBC this
morning predicted a Perry revival.

gemjack

10/18/2011 5:36:00 PM

0

On Tue, 18 Oct 2011 09:14:26 -0700 (PDT), Billy
<billybartlett30@yahoo.com> wrote:

>On Oct 18, 12:10?pm, marcus <marcus...@yahoo.com> wrote:
>> On Oct 18, 11:46?am, Billy <billybartlet...@yahoo.com> wrote:
>>
>> > On Oct 17, 7:35?pm, Mack A. Damia ?<mybaconbu...@hotmail.com> wrote:
>>
>> > >http://mashable.com/2011/10/17/herman-cain-singin...
>>
>> > I think Cain's in the midst of HIS 15 ?minutes. ?The R. nominee will
>> > be Romney. ?Which is interesting, given that he's the most moderate
>> > contender in the lot, except for Huntsman, who never even got five
>> > minutes.
>>
>> > There was a great joke about Romney from Bill Maker the other night.
>> > "The dofferencebetween Romney and a member of a cult is that a member
>> > of a cult BELIEVES things." (A reference to Romney's tendency to
>> > change his position.)
>>
>> There is no doubt that Romney will be the nominee.
>
>I'm quite sure of it, but there's some doubt. Someone on MSNBC this
>morning predicted a Perry revival.

Yeah, those are popular this time of year.

-gj