File tree Expand file tree Collapse file tree
common-tools/clas-utils/src/main/java/org/jlab/utils/benchmark Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package org .jlab .utils .benchmark ;
22
33import java .util .ArrayList ;
4- import java .util .HashMap ;
4+ import java .util .concurrent . ConcurrentHashMap ;
55import java .util .concurrent .atomic .AtomicInteger ;
66import java .util .concurrent .atomic .AtomicLong ;
77
1212public class BenchmarkTimer {
1313
1414 public static class BenchmarkMultiTimer extends BenchmarkTimer {
15- HashMap <Integer ,Long > timeAtResume = new HashMap <>();
16- HashMap <Integer ,Boolean > isPaused = new HashMap <>();
15+ ConcurrentHashMap <Integer ,Long > timeAtResume = new ConcurrentHashMap <>();
16+ ConcurrentHashMap <Integer ,Boolean > isPaused = new ConcurrentHashMap <>();
1717 public BenchmarkMultiTimer (String name ) { super (name ); }
1818 public void resume (int thread ) {
1919 if (!isPaused .containsKey (thread ) || isPaused .get (thread )) {
You can’t perform that action at this time.
0 commit comments