Skip to content

Commit 8e16e5e

Browse files
committed
Revise StopWatch for flexible time units in nanosecond precision
Closes gh-25803
1 parent dedb58f commit 8e16e5e

File tree

3 files changed

+157
-105
lines changed

3 files changed

+157
-105
lines changed

spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/benchmark/BenchmarkTests.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ private long testRepeatedAroundAdviceInvocations(String file, int howmany, Strin
117117
sw.stop();
118118
// System.out.println(sw.prettyPrint());
119119
ac.close();
120-
return sw.getLastTaskTimeMillis();
120+
return sw.getTotalTimeMillis();
121121
}
122122

123123
private long testBeforeAdviceWithoutJoinPoint(String file, int howmany, String technology) {
@@ -139,7 +139,7 @@ private long testBeforeAdviceWithoutJoinPoint(String file, int howmany, String t
139139
sw.stop();
140140
// System.out.println(sw.prettyPrint());
141141
ac.close();
142-
return sw.getLastTaskTimeMillis();
142+
return sw.getTotalTimeMillis();
143143
}
144144

145145
private long testAfterReturningAdviceWithoutJoinPoint(String file, int howmany, String technology) {
@@ -162,7 +162,7 @@ private long testAfterReturningAdviceWithoutJoinPoint(String file, int howmany,
162162
sw.stop();
163163
// System.out.println(sw.prettyPrint());
164164
ac.close();
165-
return sw.getLastTaskTimeMillis();
165+
return sw.getTotalTimeMillis();
166166
}
167167

168168
private long testMix(String file, int howmany, String technology) {
@@ -191,7 +191,7 @@ private long testMix(String file, int howmany, String technology) {
191191
sw.stop();
192192
// System.out.println(sw.prettyPrint());
193193
ac.close();
194-
return sw.getLastTaskTimeMillis();
194+
return sw.getTotalTimeMillis();
195195
}
196196

197197
}

0 commit comments

Comments
 (0)