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