void recordDuration ( DurationMetric metric , long duration , TimeUnit timeUnit , Map < String , String > payload ) { assert metric != null ; DurationHistory history = durations . get ( metric ) ; if ( history != null ) history . recordDuration ( duration , timeUnit , payload ) ; }
Record a new duration for the given metric called by the code that knows about the duration .