-
-
Notifications
You must be signed in to change notification settings - Fork 147
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
add hooks parameter to vernier #295
Conversation
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.
Thanks!
Let's try to add a test? At least a smoke test (simply checking that when the hook is provided we do not fail). We can also try to parse the report file and check if it contains some ActiveSupport event; though not sure if it's doable.
lib/test_prof/vernier.rb
Outdated
|
||
def initialize | ||
@mode = ENV.fetch("TEST_VERNIER_MODE", :wall).to_sym | ||
@target = (ENV["TEST_VERNIER"] == "boot") ? :boot : :suite | ||
|
||
sample_interval = ENV["TEST_VERNIER_INTERVAL"].to_i | ||
@interval = (sample_interval > 0) ? sample_interval : nil | ||
@hooks = (ENV["TEST_VERNIER_HOOKS"] == "rails") ? :rails : nil |
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 should probably take into account possible future named hooks; so, having smith like: ENV["TEST_VERNIER_HOOKS"]&.split(",").map(&:to_sym)
would be better.
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.
done
Report contains |
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.
🚀
What is the purpose of this pull request?
Add hooks configuration parameter for
TestProf::Vernier
to add event markers from Active Support NotificationsChecklist
Closes #289