Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > ruby-prof for WATIR testcase calls WIN32OLE#method_missing

Reply
Thread Tools

ruby-prof for WATIR testcase calls WIN32OLE#method_missing

 
 
Sandeep Gupta
Guest
Posts: n/a
 
      06-09-2009
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-forum.com/attachment/3798/profile.zip

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

 
Reply With Quote
 
 
 
 
Heesob Park
Guest
Posts: n/a
 
      06-09-2009
Hi,

2009/6/9 Sandeep Gupta <>:
> 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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Watir: How to return a Watir::IE object for an existing IE? Anukul Singhal Ruby 1 05-15-2008 04:57 PM
Differerence between Test::Unit::TestCase and RUNIT::TestCase Scott Ruby 1 08-20-2005 08:49 PM
Create TestCase with WSAD on EJB Memi Lavi Java 0 08-05-2004 03:23 PM
Computing test methods in unittest.TestCase Jan Decaluwe Python 2 03-02-2004 06:33 PM
standard struts testcase failed ? Charlie Java 1 10-16-2003 04:58 AM



Advertisments