Skip to content

Commit b507740

Browse files
AbhinabKanrarpivovarit
authored andcommitted
as per suggestetion (eugenp#2120)
* moving jmh into libraries module * refactoring jmh * Update pom.xml * manual algorightm * with BM result * fix for space issue * Fixed indentation * change as per suggestion
1 parent 2f652a2 commit b507740

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

‎libraries/src/main/java/com/baeldung/jmh/warmup/MainApplication.java‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22

33
public class MainApplication {
44

5-
static long start;
6-
static long end;
7-
85
static {
6+
long start = System.nanoTime();
97
ManualClassLoader.load();
8+
long end = System.nanoTime();
9+
System.out.println("Warm Up time : " + (end - start));
1010
}
1111

1212
public static void main(String[] args) {
13-
start = System.nanoTime();
13+
long start = System.nanoTime();
1414
ManualClassLoader.load();
15-
end = System.nanoTime();
15+
long end = System.nanoTime();
1616
System.out.println("Total time taken : " + (end - start));
1717
}
1818

19-
}
19+
}

0 commit comments

Comments
 (0)