Webgrind + Rails

96 views
Skip to first unread message

krispouille

unread,
Sep 22, 2011, 3:32:13 AM9/22/11
to webgrind
Hello all,

Once again, congrats for this good app. I'm using webgrind for all my
php project and i don't have any BIG problems with it. Recently, i
switched to Rails and my idea was to keep webgrind as my default
profiler. For information, i've added "ruby-prof" in my gemfile
(http://ruby-prof.rubyforge.org/) and then i've followed the
instructions to have an output readable by Kcachegrind.

From now, i've succeeded in creating a list of all the calls BUT my
problems are :
- the "invocation count" column with the same value : 1
- the "total self cost" column with the same value : 0
- the "total inclusive cost" column with the same value : 0

In addition to that, my cachegrind.out... files for php and for ruby
seems to be similar; except may be the start :
my php cachegrind file starts with :
<code>
version: 0.9.6
cmd: Command line code
part: 1

events: Time
...
</code>

my ruby cachegrind file starts with :
<code>
events: Time
...
</code>

I hope this was to confusing for you ... Can you help me ?
Bye (sorry for my english)

oetting

unread,
Sep 22, 2011, 5:55:44 AM9/22/11
to webgrind
HiSounds interesting. We have not tested with anything other than
cachegrind files generated by xdebug.
If you send me an example file I will have a look at it.
Jacob

Chrislain Jemba

unread,
Sep 22, 2011, 6:36:39 AM9/22/11
to webgrind...@googlegroups.com
Hi,
Here are :

- the file (cachegrind.out.rails with only the first 100 lines ...) 
- my kcachegrind screenshot which seems to work well
- my webgrind screenshot (with the bug i've told you earlier)

Once again thx for your help.

--
You received this message because you are subscribed to the Google Groups "webgrind" group.
To post to this group, send email to webgrind...@googlegroups.com.
To unsubscribe from this group, send email to webgrind-gener...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/webgrind-general?hl=en.




--
JEMBA EBOUMBOU Chrislain
Consultant web
http://www.relookeo.com
http://www.twitter.com/krispouille
cachegrind.out.rails
cachegrind.out.rails.png
webgrind.rails.png

oetting

unread,
Sep 22, 2011, 7:10:18 AM9/22/11
to webgrind
It is unable to calculate percent of time because it uses the summary
line for that.

Try switching to milliseconds or microseconds. Does that work?
>  cachegrind.out.rails
> 2KViewDownload
>
>  cachegrind.out.rails.png
> 308KViewDownload
>
>  webgrind.rails.png
> 181KViewDownload

Chrislain Jemba

unread,
Sep 22, 2011, 7:23:20 AM9/22/11
to webgrind...@googlegroups.com
indeed ! it works ;-)
I have not tried it !
Great !

oetting

unread,
Sep 22, 2011, 7:25:36 AM9/22/11
to webgrind
Great. It would be possible to change the code so that it uses the sum
of all invocations instead of the summary if it is not available.

Chrislain Jemba

unread,
Sep 22, 2011, 7:45:23 AM9/22/11
to webgrind...@googlegroups.com
Thx again for your help
Reply all
Reply to author
Forward
0 new messages