-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: unify environments between the two modes #59
Conversation
7d05444
to
0642648
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, only one small remark on where to define the RunnerMode
linked to an Executor
cmd.arg(ARCH).arg("-R"); | ||
// Configure the environment | ||
cmd.env( | ||
cmd.envs(get_base_injected_env( | ||
RunnerMode::Instrumentation, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we have the executor define its RunnerMode
?
So that we do not have to hardcode it here, and instead have it as a method of the Executor
trait
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not useful with the valgrind executor since it needs refactoring to be properly implemented. We could drill the mode into measure
but that would be pointless.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, tested locally and it works, no more invalid measurement mode: valgrind
😎
use crate::prelude::*; | ||
use crate::run::instruments::mongo_tracer::MongoTracer; | ||
use crate::run::{check_system::SystemInfo, config::Config}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: import grouping
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can cargo fmt handle this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could set this in our repos: https://rust-lang.github.io/rustfmt/?version=v1.6.0&search=granula#Crate%5C%3A
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nevermind it's unstable and therefore not able to be put in rustfmt.toml, it needs to be set at IDE level 😢
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:(
@adriencaccia there was confusion between Mode and Executor, so I refactored this logic. I hadn't pulled it, so I redid the changes you made in the last commit, but in another way.