#NEWLINE# def on_finish( self ) : #NEWLINE# #INDENT# duration = ( datetime . utcnow ( ) - self . _request_start_time ) #NEWLINE# duration_ms = int ( ( duration . total_seconds ( ) * 1000 ) ) #NEWLINE# stats . incr ( 'duration_ms' , duration_ms ) #NEWLINE# stats . incr ( 'duration_ms_{}' . format ( self . __class__ . __name__ ) , duration_ms ) #NEWLINE# response_status = self . get_status ( ) #NEWLINE# stats . incr ( 'response_status_{}' . format ( response_status ) ) #NEWLINE# stats . incr ( 'response_status_{}_{}' . format ( self . __class__ . __name__ , response_status ) )