-
Notifications
You must be signed in to change notification settings - Fork 13
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 --per-file option #30
base: master
Are you sure you want to change the base?
Conversation
oops, should I support Ruby 2.3 to pass CI? or drop support 2.3 and add 2.5 to CI matrix to support latest 2 minor versions of Ruby. |
Yes. Because default Ruby on macOS is still Ruby 2.3... I recommend you to use just call executions.map(:time).reduce(:+) |
okey, I understand support policy for this project. |
Fixed to support Ruby 2.3. |
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.
Execution
class represents execution times of each methods. Not them of whole methods in files.
So I think this implementation seems to be bit strange.
Just my idea, you're better to define FileExecutionReporter
to show summation.
If --per-file
option is passed. using the reporter instead of StandardOutputReporter
.
execution.path | ||
}.map { |path, executions| | ||
time = executions.map(&:time).reduce(:+) | ||
Execution.new(time, "#{path}:0:0", '') |
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.
It's bit strange to pass 0 as line number or column...
hi @giginet
I want to add
--per-file
option to sum time per file.It is useful to know total compile time for file is reduced when if we refactoring single function to split some small functions.
example
off(default)
on
thanks.