[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, experimental, updated. debian/2.6.8-1-844-g7ec39d5
Daniel Pittman
daniel at puppetlabs.com
Tue May 10 08:11:54 UTC 2011
The following commit has been merged in the experimental branch:
commit 78cb48cea0b14eabdfd728c2f9fc183f587faded
Author: Daniel Pittman <daniel at puppetlabs.com>
Date: Fri Apr 8 13:39:37 2011 -0700
maint: disable garbage collector during individual test cases.
This reduced overhead of garbage collection from 50 percent to 20 percent in
my test runs, and reduced wall-time to match. This seems to be a reasonable
win: we allow the GC to run on demand, but only outside the testing.
Memory use went from ~ 300MB to ~550MB between runs, which suggests that we
are generating a *lot* of garbage at times, but that we also benefit from
cleaning it automatically on a regular basis.
Reviewed-By: Matt Robinson <matt at puppetlabs.com>
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index fc63c6d..e8ab666 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -38,6 +38,8 @@ RSpec.configure do |config|
config.mock_with :mocha
config.before :each do
+ GC.disable
+
# these globals are set by Application
$puppet_application_mode = nil
$puppet_application_name = nil
@@ -65,6 +67,8 @@ RSpec.configure do |config|
@logs.clear
Puppet::Util::Log.close_all
+
+ GC.enable
end
end
--
Puppet packaging for Debian
More information about the Pkg-puppet-devel
mailing list