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
When doing timings in multi-threaded regions currently using the merge! function requires one to pass exactly the path at which the timings are supposed to be stored. Especially for larger nested timings where moreover the nesting might depend on the call hierarchy this is not convenient.
Apart from the breaking change is there any reason not to have the definition
function Base.merge!(self::TimerOutput, others::TimerOutput...; tree_point = [t.name for t in self.timer_stack])
...end
such that this pattern
const to =TimerOutput()
functionworkfunction()
Threads.@threadsfor i =1:100
tlocal =TimerOutput()
@timeit tlocal "work"sleep(2)
merge!(to, tlocal)
endend@timeit to "outer"begin@timeit to "inner"beginworkfunction()
endend
would automatically accumulate the timings in the path outer/inner/work?
The text was updated successfully, but these errors were encountered:
When doing timings in multi-threaded regions currently using the
merge!
function requires one to pass exactly the path at which the timings are supposed to be stored. Especially for larger nested timings where moreover the nesting might depend on the call hierarchy this is not convenient.Apart from the breaking change is there any reason not to have the definition
such that this pattern
would automatically accumulate the timings in the path
outer/inner/work
?The text was updated successfully, but these errors were encountered: