issues with saikuro results and :gchart

23 views
Skip to first unread message

Martin

unread,
Feb 13, 2010, 7:33:27 PM2/13/10
to metric_fu
Hi,

thank you for a great tool!

For some reason, when I get to the ../tmp/metric_fu/output/
saikuro.html page, there are no results there. Aall other metric_fu
components work though. Saikuro results are only available in the
scratch_directory, is that intended?

Also, the default graphing works, but option config.graph_engine
= :gcharts crashes the rake:

---------------------------
$ rake metrics:all
(in /Users/Arta/Sites/house)
saikuro --output_directory scratch_directory/saikuro --formater text --
input_directory "app | lib" --cyclo --filter_cyclo 0 --warn_cyclo 5 --
error_cyclo 7
Generating graphs
Generating graphs for tmp/metric_fu/_data/20100213.yml
rake aborted!
bad URI(is not URI?):
http://chart.apis.google.com/chart?chxl=0:|2%2F13|1:|0|35|70|105|140|175&chxt=x,y&chco=009999,FF7400&chd=s:4,c&chdl=average|top+5%2525+average&chtt=Flog:%20code%20complexity&cht=lc&chs=1000x300&chxr=1,158.3,175|2,81.4,175
--------------------------

I'm running: ruby 1.8.7, rails 2.3.4, metric_fu 1.3.0, saikuro 1.1.0

thanks,
martin

Osaris

unread,
Feb 17, 2010, 2:08:53 PM2/17/10
to metric_fu
Same googlecharts error (metric_fu (1.3.0), googlecharts (1.5.1)). No
problem for saikuro.

On 14 fév, 01:33, Martin <martin.fe...@gmail.com> wrote:
> Hi,
>
> thank you for a great tool!
>
> For some reason, when I get to the ../tmp/metric_fu/output/
> saikuro.html page, there are no results there. Aall other metric_fu
> components work though. Saikuro results are only available in the
> scratch_directory, is that intended?
>
> Also, the default graphing works, but option config.graph_engine
> = :gcharts crashes the rake:
>
> ---------------------------
> $ rake metrics:all
> (in /Users/Arta/Sites/house)
> saikuro --output_directory scratch_directory/saikuro --formater text --
> input_directory "app | lib" --cyclo  --filter_cyclo 0 --warn_cyclo 5 --
> error_cyclo 7
> Generating graphs
> Generating graphs for tmp/metric_fu/_data/20100213.yml
> rake aborted!

> bad URI(is not URI?):http://chart.apis.google.com/chart?chxl=0:|2%2F13|1:|0|35|70|105|140|175&chxt=x,y&chco=009999,FF7400&chd=s:4,c&chdl=av erage|top+5%2525+average&chtt=Flog:%20code%20complexity&cht=lc&chs=1000x300 &chxr=1,158.3,175|2,81.4,175

mbec...@gmail.com

unread,
Mar 15, 2010, 6:16:39 AM3/15/10
to metric_fu
Hi,

I'm having the same problem with the saikuro page. I can see that
saikuro is running but the report page shows nothing.

I'm also having a problem with using the google charts api. it gives
me the bad uri error and I have no idea how to get around this.

Does anyone have any suggestions, particularly for the saikuro
problem.

On Feb 13, 5:33 pm, Martin <martin.fe...@gmail.com> wrote:
> Hi,
>
> thank you for a great tool!
>
> For some reason, when I get to the ../tmp/metric_fu/output/
> saikuro.html page, there are no results there. Aall other metric_fu
> components work though. Saikuro results are only available in the
> scratch_directory, is that intended?
>
> Also, the default graphing works, but option config.graph_engine
> = :gcharts crashes the rake:
>
> ---------------------------
> $ rake metrics:all
> (in /Users/Arta/Sites/house)
> saikuro --output_directory scratch_directory/saikuro --formater text --
> input_directory "app | lib" --cyclo  --filter_cyclo 0 --warn_cyclo 5 --
> error_cyclo 7
> Generating graphs
> Generating graphs for tmp/metric_fu/_data/20100213.yml
> rake aborted!

> bad URI(is not URI?):http://chart.apis.google.com/chart?chxl=0:|2%2F13|1:|0|35|70|105|140|175&chxt=x,y&chco=009999,FF7400&chd=s:4,c&chdl=av erage|top+5%2525+average&chtt=Flog:%20code%20complexity&cht=lc&chs=1000x300 &chxr=1,158.3,175|2,81.4,175

Dan Mayer

unread,
Mar 16, 2010, 12:55:22 PM3/16/10
to metr...@googlegroups.com
have you checked tmp/metric_fu/scratch/saikuro and looked at any output there?

have you tried running saikuro directly on your project and seeing if it creates correct output? ('saikuro -c -i app/' this should output index_cyclo.html in your root directory with data)

If you are trying to run on two src folders like app and lib, saikuro in the current release of metric_fu has a problem. Try running it only on app and see if saikuro then works. If that if that solves your issues, I can point you to a patch which you can apply to get saikuro working.

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


sdillard

unread,
Mar 19, 2010, 6:28:35 PM3/19/10
to metric_fu
If a duplicate appears, sorry, but my first post seems to have
wandered off this list somehow.
My saikuro output has been blank ever since I started using metric_fu
(~2 weeks ago), and today I decided to tackle it. The problem I found
was that saikuro (at least my version) doesn't like the pipe-delimited
input_directory argument. So, I modified the emit method in the
saikuro generator (lib/generators/saikuro.rb) to iterate the input
directories and pass in each as an argument. Saikuro is fine with
multiple commands for the input directory, it seems, so this works.
It may not be the most elegant solution, but it works for me. Here is
my revised emit method:

def emit
#MetricFu.saikuro[:input_directory] = format_directories

options_string = MetricFu.saikuro.inject("") do |options, option|
options + "--#{option.join(' ')} " unless option
== :input_directory
end
MetricFu.saikuro[:input_directory].each do |input_dir|
options_string += "--input_directory #{input_dir} "
end

sh %{saikuro #{options_string}} do |ok, response|
unless ok
puts "Saikuro failed with exit status: #{response.exitstatus}"
exit 1
end
end
end

All this does is ignore the attempt to join the input directories and
ignore the input_directory option on first pass then append the
input_directory entries in the options array to the options string.
Hope this helps someone

On Mar 16, 11:55 am, Dan Mayer <danma...@gmail.com> wrote:
> have you checked tmp/metric_fu/scratch/saikuro and looked at any output
> there?
>
> have you tried running saikuro directly on your project and seeing if it
> creates correct output? ('saikuro -c -i app/' this should
> output index_cyclo.html in your root directory with data)
>
> If you are trying to run on two src folders like app and lib, saikuro in the
> current release of metric_fu has a problem. Try running it only on app and
> see if saikuro then works. If that if that solves your issues, I can point
> you to a patch which you can apply to get saikuro working.
>
> peace,
> Dan Mayer

> Co-founder, Devver.net (http://devver.net)http://twitter.com/devverhttp://mayerdan.comhttp://twitter.com/danmayer

> >http://chart.apis.google.com/chart?chxl=0:|2%2F13|1:|0|35|70|105|140|175&chxt=x,y&chco=009999,FF7400&chd=s:4,c&chdl=average|top+5%2525+average&chtt=Flog:%20code%20complexity&cht=lc&chs=1000x300


> > &chxr=1,158.3,175|2,81.4,175
> > > --------------------------
>
> > > I'm running: ruby 1.8.7, rails 2.3.4, metric_fu 1.3.0, saikuro 1.1.0
>
> > > thanks,
> > > martin
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "metric_fu" group.
> > To post to this group, send email to metr...@googlegroups.com.
> > To unsubscribe from this group, send email to

> > metric_fu+...@googlegroups.com<metric_fu%2Bunsu...@googlegroups.com>

sdillard

unread,
Mar 19, 2010, 6:21:10 PM3/19/10
to metric_fu
I was running into this, too. Not sure what changed when, but I have
been getting blank output ever since I started using metric_fu and
decided to tackle this one today. The problem is that (at least for
me) saikuro doesn't like having the input directory be pipe
delimited. Maybe this changed in saikuro? Anyway, I did a little
monkeypatch to fix it.
Here is my revised emit method in the saikuro.rb file (in lib/
generators):

def emit
#MetricFu.saikuro[:input_directory] = format_directories

options_string = MetricFu.saikuro.inject("") do |options,
option|
options + "--#{option.join(' ')} " unless option
== :input_directory
end
MetricFu.saikuro[:input_directory].each do |input_dir|
options_string += "--input_directory #{input_dir} "
end

sh %{saikuro #{options_string}} do |ok, response|
unless ok
puts "Saikuro failed with exit status:
#{response.exitstatus}"
exit 1
end
end
end

Saikuro is ok with having multiple input directories, so all this does
is create an argument for each one rather than try to join them in a
pipe-delimited way. This may not be the most elegant solution, but it
works for me.

On Mar 16, 11:55 am, Dan Mayer <danma...@gmail.com> wrote:
> have you checked tmp/metric_fu/scratch/saikuro and looked at any output
> there?
>
> have you tried running saikuro directly on your project and seeing if it
> creates correct output? ('saikuro -c -i app/' this should
> output index_cyclo.html in your root directory with data)
>
> If you are trying to run on two src folders like app and lib, saikuro in the
> current release of metric_fu has a problem. Try running it only on app and
> see if saikuro then works. If that if that solves your issues, I can point
> you to a patch which you can apply to get saikuro working.
>
> peace,
> Dan Mayer

> Co-founder, Devver.net (http://devver.net)http://twitter.com/devverhttp://mayerdan.comhttp://twitter.com/danmayer

> >http://chart.apis.google.com/chart?chxl=0:|2%2F13|1:|0|35|70|105|140|175&chxt=x,y&chco=009999,FF7400&chd=s:4,c&chdl=average|top+5%2525+average&chtt=Flog:%20code%20complexity&cht=lc&chs=1000x300


> > &chxr=1,158.3,175|2,81.4,175
> > > --------------------------
>
> > > I'm running: ruby 1.8.7, rails 2.3.4, metric_fu 1.3.0, saikuro 1.1.0
>
> > > thanks,
> > > martin
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "metric_fu" group.
> > To post to this group, send email to metr...@googlegroups.com.
> > To unsubscribe from this group, send email to

> > metric_fu+...@googlegroups.com<metric_fu%2Bunsu...@googlegroups.com>

Dan Mayer

unread,
Mar 21, 2010, 1:14:18 PM3/21/10
to metr...@googlegroups.com
Great that seems like a easier solution than the patch I did. Basically when Saikuro was part of metric_fu it supported piped input directories ( dir1 | dir2 | dir_etc ), when Saikuro was removed from metric_fu and the gem was used, this no longer worked if there was more than one directory. It would give empty output as you were seeing. I ended up creating a new saikuro gem which accepted piped directories, but your solution does seem simpler, and easier to add into metric_fu than forcing it to use a new Saikuro gem. 

I give this a plus one vote to be merged into metric_fu's, next release.

Glad you got things working.

peace,
Dan Mayer
To unsubscribe from this group, send email to metric_fu+...@googlegroups.com.

Ray B

unread,
Mar 30, 2010, 8:07:16 PM3/30/10
to metric_fu
As for google charts, use gem version 1.5.2 solved the issue for me.
Looks like 1.5.2 fixed a bug related to metric_fu, but using the
latest version doesn't work either so the bug is back in 1.5.3 or
1.5.4.

Ray

On Mar 21, 1:14 pm, Dan Mayer <danma...@gmail.com> wrote:
> Great that seems like a easier solution than the patch I did. Basically when
> Saikuro was part of metric_fu it supported piped input directories ( dir1 |
> dir2 | dir_etc ), when Saikuro was removed from metric_fu and the gem was
> used, this no longer worked if there was more than one directory. It would
> give empty output as you were seeing. I ended up creating a new saikuro gem
> which accepted piped directories, but your solution does seem simpler, and
> easier to add into metric_fu than forcing it to use a new Saikuro gem.
>
> I give this a plus one vote to be merged into metric_fu's, next release.
>
> Glad you got things working.
>
> peace,
> Dan Mayer

> > <metric_fu%2Bunsu...@googlegroups.com<metric_fu%252Buns...@googlegroups.com>

Reply all
Reply to author
Forward
0 new messages