test/hotspot/jtreg/compiler/graalunit/com.oracle.mxtool.junit/com/oracle/mxtool/junit/TimingDecorator.java
equal
deleted
inserted
replaced
20 * or visit www.oracle.com if you need additional information or have any |
20 * or visit www.oracle.com if you need additional information or have any |
21 * questions. |
21 * questions. |
22 */ |
22 */ |
23 package com.oracle.mxtool.junit; |
23 package com.oracle.mxtool.junit; |
24 |
24 |
25 import java.util.HashMap; |
|
26 import java.util.Map; |
25 import java.util.Map; |
|
26 import java.util.concurrent.ConcurrentHashMap; |
27 |
27 |
28 import org.junit.runner.Description; |
28 import org.junit.runner.Description; |
29 |
29 |
30 /** |
30 /** |
31 * Timing support for JUnit test runs. |
31 * Timing support for JUnit test runs. |
38 final Map<Class<?>, Long> classTimes; |
38 final Map<Class<?>, Long> classTimes; |
39 final Map<Description, Long> testTimes; |
39 final Map<Description, Long> testTimes; |
40 |
40 |
41 TimingDecorator(MxRunListener l) { |
41 TimingDecorator(MxRunListener l) { |
42 super(l); |
42 super(l); |
43 this.classTimes = new HashMap<>(); |
43 this.classTimes = new ConcurrentHashMap<>(); |
44 this.testTimes = new HashMap<>(); |
44 this.testTimes = new ConcurrentHashMap<>(); |
45 } |
45 } |
46 |
46 |
47 @Override |
47 @Override |
48 public void testClassStarted(Class<?> clazz) { |
48 public void testClassStarted(Class<?> clazz) { |
49 classStartTime = System.nanoTime(); |
49 classStartTime = System.nanoTime(); |