# File lib/puppet/reports/rrdgraph.rb, line 93
 93:   def process(time = nil)
 94:     time ||= Time.now.to_i
 95: 
 96:     unless File.directory?(hostdir) and FileTest.writable?(hostdir)
 97:       # Some hackishness to create the dir with all of the right modes and ownership
 98:       config = Puppet::Util::Settings.new
 99:       config.setdefaults(:reports, :hostdir => {:default => hostdir, :owner => 'service', :mode => 0755, :group => 'service', :desc => "eh"})
100: 
101:       # This creates the dir.
102:       config.use(:reports)
103:     end
104: 
105:     self.metrics.each do |name, metric|
106:       metric.basedir = hostdir
107: 
108:       if name == "time"
109:         timeclean(metric)
110:       end
111: 
112:       metric.store(time)
113: 
114:       metric.graph
115:     end
116: 
117:     mkhtml unless FileTest.exists?(File.join(hostdir, "index.html"))
118:   end