private static void addTimePerComponent(HashMap<String, Long> mapComponentTimes,	Component component) {
    Long currentTimeOfComponent = 0L;
    String key = component.getComponentType();
    if (mapComponentTimes.containsKey(key)) {
      currentTimeOfComponent = mapComponentTimes.get(key);
    }
    //when transactions are run in parallel, we should log the longest transaction only to avoid that 
    //for ex 'Total time' would be 100ms and transactions in parallel to hornetQ will be 2000ms 
    Long maxTime =  Math.max(component.getTime(), currentTimeOfComponent);
    mapComponentTimes.put(key, maxTime);
  }
private static void addTimePerComponent ( HashMap < String , Long > mapComponentTimes , Component component ) { Long currentTimeOfComponent = 0L ; String key = component . getComponentType ( ) ; if ( mapComponentTimes . containsKey ( key ) ) { currentTimeOfComponent = mapComponentTimes . get ( key ) ; } Long maxTime = Math . max ( component . getTime ( ) , currentTimeOfComponent ) ; mapComponentTimes . put ( key , maxTime ) ; }
Add component processing time to given map
@param mapComponentTimes
@param component