Skip to content
This repository was archived by the owner on Apr 13, 2026. It is now read-only.

fix environment initialization#28

Open
colinsurprenant wants to merge 2 commits into
elastic:masterfrom
colinsurprenant:fix/env
Open

fix environment initialization#28
colinsurprenant wants to merge 2 commits into
elastic:masterfrom
colinsurprenant:fix/env

Conversation

@colinsurprenant

Copy link
Copy Markdown
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.

Comment thread lib/lsperfm/core/run.rb
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
Copy Markdown
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
Copy Markdown
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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants