summaryrefslogtreecommitdiffstats
path: root/lib/puppet/reports
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-05-04 05:04:29 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-05-04 05:04:29 +0000
commit28254b55cc65d572e9036046d7765c6dd7505e70 (patch)
tree5ae1067534c9bdf6de73a79836afb3ba84438d36 /lib/puppet/reports
parent0c07125397428a0c1ca9a4a4d0176f45d8be0979 (diff)
downloadpuppet-28254b55cc65d572e9036046d7765c6dd7505e70.tar.gz
puppet-28254b55cc65d572e9036046d7765c6dd7505e70.tar.xz
puppet-28254b55cc65d572e9036046d7765c6dd7505e70.zip
Adding a --summarize option, to get a transaction summary
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2459 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/reports')
-rw-r--r--lib/puppet/reports/rrdgraph.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/puppet/reports/rrdgraph.rb b/lib/puppet/reports/rrdgraph.rb
index 49ab7452b..005efdca8 100644
--- a/lib/puppet/reports/rrdgraph.rb
+++ b/lib/puppet/reports/rrdgraph.rb
@@ -110,6 +110,11 @@ Puppet::Network::Handler.report.newreport(:rrdgraph) do
self.metrics.each do |name, metric|
metric.basedir = hostdir
+
+ if name == :time
+ timeclean(metric)
+ end
+
metric.store(time)
metric.graph
@@ -119,6 +124,14 @@ Puppet::Network::Handler.report.newreport(:rrdgraph) do
mkhtml()
end
end
+
+ # Unfortunately, RRD does not deal well with changing lists of values,
+ # so we have to pick a list of values and stick with it. In this case,
+ # that means we record the total time, the config time, and that's about
+ # it. We should probably send each type's time as a separate metric.
+ def timeclean(metric)
+ metric.values = metric.values.find_all { |name, label, value| name == :total }
+ end
end
# $Id$