Skip to content

Conversation

colinsurprenant
Copy link
Contributor

two fixes:

1- an env hash is passed to popen3 to make sure to reset any bundler settings to not interfere with the launched app. this allow launching an external logstash from the performance testing dir, for example:

bundle exec bin/lsperfm examples/suite/basic_performance_quick.rb  /Users/colin/dev/src/elasticsearch/logstash

2- correctly sets path for suites configs.

stats = LogStash::PerformanceMeter::Stats.new
real_events_count = 0
Open3.popen3(*@command) do |i, o, e|
Open3.popen3({:BUNDLE_BIN_PATH => "", :BUNDLE_GEMFILE => "", :RUBYOPT => ""}, *@command) do |i, o, e|
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this change, good idea. Can we make this options passed throught a var? something like

ENV_OPTS = {:BUNDLE_BIN_PATH => "", :BUNDLE_GEMFILE => "", :RUBYOPT => ""}

and then have

Open3.popen3(ENV_OPTS, *@command)....

what do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

@purbon purbon removed their assignment Jan 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants