How to change the output directory of metric_fu

I would like to treat the great reports generated by metric_fu as documentation and keep them in my repository. So how do we convince it to save its output in doc/ instead of tmp/ ?

Stew Welbourne has the answer:

MetricFu::Configuration.run do |config|
  config.base_directory     = 'doc/metrics'
  config.scratch_directory  = File.join(config.base_directory, 'scratch')
  config.output_directory   = File.join(config.base_directory, 'output')
  config.data_directory     = File.join(config.base_directory, '_data')

  config.saikuro  = { :o utput_directory => File.join(config.scratch_directory, 'saikuro'),

  # the rest of your configuration goes here
end

Just make sure that your new target directory is two folders deep, as the original tmp/metric_fu is, or you may get in trouble with the graphing part of metric_fu. VoilĂ !

Leave a Reply

  • About

    Unsleepable is a free theme for WordPress created by Ben Gray. If you don't want this particular text on your site then you'll have to either edit it manually or slide a widget in to this area. This area is called "subfoot center."
    ADD A WIDGET HERE (SUBFOOT RIGHT)