You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That doesn't work, because StackProf.run returns the written file. I didn't expect that. I don't think it's even documented anywhere. I'm not sure it's useful. I'm not talking about the case where out: is not given, case where I understand the return value is a Hash with the results which is clearly useful.
Given that I don't care about the result of StackProf.run but I do care about the result of the block, I wrote:
This is imo so ugly that I preferred using start and stop/results in my own ensure...
I found equally surprising that results() returns a Hash with all the results and that results('path') writes the file and returns that file (also couldn't find documentation on this) and that there is no dump_results method or similar.
The text was updated successfully, but these errors were encountered:
StackProf
is amazing, thank you!I hope this will be useful, but if not feel free to close this issue.
StackProf
was:That doesn't work, because
StackProf.run
returns the written file. I didn't expect that. I don't think it's even documented anywhere. I'm not sure it's useful. I'm not talking about the case whereout:
is not given, case where I understand the return value is a Hash with the results which is clearly useful.StackProf.run
but I do care about the result of the block, I wrote:Yes, I'm that lazy 😅
And no, it doesn't work, because the writing of the file is not in the "ensure" block. Is that by design? Why? Seems like a bug to me.
Of course, I can go around by doing the quite pedestrian:
This is imo so ugly that I preferred using
start
andstop/results
in my ownensure
...I found equally surprising that
results()
returns a Hash with all the results and thatresults('path')
writes the file and returns that file (also couldn't find documentation on this) and that there is nodump_results
method or similar.The text was updated successfully, but these errors were encountered: