Skip to content

Instantly share code, notes, and snippets.

@FaKleiser
Created March 2, 2015 10:21
Show Gist options
  • Save FaKleiser/ef0fb890827fb47ca06e to your computer and use it in GitHub Desktop.
Save FaKleiser/ef0fb890827fb47ca06e to your computer and use it in GitHub Desktop.
Measure Eclipse debugging performance
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