diff options
| author | Paul Berry <paul@puppetlabs.com> | 2010-12-30 13:29:47 -0800 |
|---|---|---|
| committer | Paul Berry <paul@puppetlabs.com> | 2010-12-30 13:29:47 -0800 |
| commit | f1abd3c16eccfac60a19462a244c55924b737c2d (patch) | |
| tree | 704631b3841d536b82cbecc18a1886023dbf94e2 /lib/puppet/application | |
| parent | 0b78decacf508f7586d3d4ee90277b980d4879a2 (diff) | |
| parent | 1f72c31f9e0223e71e2729da96e0e98ebea5417e (diff) | |
Merge branch 'ticket/2.6.next/5715' into 2.6.next
* ticket/2.6.next/5715:
(#5715) Added attributes resource_type and title to Puppet::Resource::Status.
(#5715) Removed attribute source_description from the YAML representation of Puppet::Resource::Status.
(#5715) Removed unnecessary attributes from YAML of Puppet::Transaction::Event.
(#5715) Make certain report attributes always present.
(#5715) Changed the type of metric names to always be strings.
(#5715) Add status attribute to reports.
(#5715) Made the report "calculate" methods strictly functional.
(#5715) Made the changes/total and events/total metrics always present
(#5715) Refactor in preparation for adding a status attribute to reports.
(#5715) Added total time to inspect reports and made inspect metrics more consistent.
(#5715) Removed Puppet::Transaction::Report#external_times from YAML output.
(#5715) Added total time metric to apply reports.
(#5715) Removed redundant attribute Transaction::Event#version
(#5715) Removed redundant attribute Resource::Status#version
(#5715) Removed Puppet::Util::Log#version.
(#5715) Removed the unused attribute Puppet::Transaction::Event#node
(#5715) Removed Resource::Status#skipped_reason. It was never used.
(#5715) Prep work: Fixed add_statuses in report_spec.
Diffstat (limited to 'lib/puppet/application')
| -rw-r--r-- | 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 caa32a7c2..2f068a271 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.finalize_report begin @report.save |
