Inspect reports now contain all the metrics that apply reports do, and
use the same code path for creating them.

Signed-off-by: Paul Berry <[email protected]>
---
 lib/puppet/application/inspect.rb |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/puppet/application/inspect.rb 
b/lib/puppet/application/inspect.rb
index caa32a7..e6c35ea 100644
--- a/lib/puppet/application/inspect.rb
+++ b/lib/puppet/application/inspect.rb
@@ -51,10 +51,8 @@ class Puppet::Application::Inspect < Puppet::Application
 
     @report.configuration_version = catalog.version
 
-    retrieval_time =  Time.now - retrieval_starttime
-    @report.add_times("config_retrieval", retrieval_time)
-
-    starttime = Time.now
+    inspect_starttime = Time.now
+    @report.add_times("config_retrieval", inspect_starttime - 
retrieval_starttime)
 
     catalog.to_ral.resources.each do |ral_resource|
       audited_attributes = ral_resource[:audit]
@@ -70,7 +68,9 @@ class Puppet::Application::Inspect < Puppet::Application
       @report.add_resource_status(status)
     end
 
-    @report.add_metric(:time, {"config_retrieval" => retrieval_time, "inspect" 
=> Time.now - starttime})
+    finishtime = Time.now
+    @report.add_times("inspect", finishtime - inspect_starttime)
+    @report.calculate_metrics
 
     begin
       @report.save
-- 
1.7.2

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to