public void updateStat ( final int query_index , final QueryStat name , final long value ) { Map < QueryStat , Long > qs = query_stats . get ( query_index ) ; long cum_time = value ; if ( qs == null ) { qs = new HashMap < QueryStat , Long > ( ) ; query_stats . put ( query_index , qs ) ; } if ( qs . containsKey ( name ) ) { cum_time += qs . get ( name ) ; } qs . put ( name , cum_time ) ; }
Increments the cumulative value for a cumulative stat . If it s a time then it must be in nanoseconds