mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-30 02:56:26 -05:00
Don't look for external facts when benchmarking
When running `scripts/bench.rb` via the discourse/discourse_bench docker container, Facter throws an EACCES error attempting to load external puppet facts. Since the benchmark script ends up ignoring everything except for seven specific keys, we can just avoid loading any external fact logic entirely. can just
This commit is contained in:
parent
641b95f655
commit
75e22086a9
1 changed files with 3 additions and 2 deletions
|
@ -219,6 +219,9 @@ begin
|
|||
|
||||
puts "Your Results: (note for timings- percentile is first, duration is second in millisecs)"
|
||||
|
||||
# Prevent using external facts because it breaks when running in the
|
||||
# discourse/discourse_bench docker container.
|
||||
Facter::Util::Config.external_facts_dirs = []
|
||||
facts = Facter.to_hash
|
||||
|
||||
facts.delete_if{|k,v|
|
||||
|
@ -270,8 +273,6 @@ begin
|
|||
end
|
||||
end
|
||||
|
||||
|
||||
# TODO include Facter.to_hash ... for all facts
|
||||
ensure
|
||||
Process.kill "KILL", pid
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue