Created
March 2, 2015 10:21
-
-
Save FaKleiser/ef0fb890827fb47ca06e to your computer and use it in GitHub Desktop.
Measure Eclipse debugging performance
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package app; | |
public class Debug { | |
// 4 seconds in milliseconds | |
private static final long MEASUREMENT_TIME = 4 * 1000; | |
public static void main(final String[] args) { | |
final long res = longRunningOperation(); | |
System.out.println(res); | |
} | |
private static long longRunningOperation() { | |
final long started = System.currentTimeMillis(); | |
long cnt = 0; | |
while (System.currentTimeMillis() - started < MEASUREMENT_TIME) { | |
cnt++; | |
} | |
return cnt; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment