Add launcher.count as useful performance testing aid

This commit is contained in:
Dave Syer 2014-01-14 13:03:16 +00:00
parent 895daacde9
commit e1605b4691
2 changed files with 8 additions and 2 deletions

View File

@ -41,6 +41,9 @@ public class JarLauncher extends ExecutableArchiveLauncher {
}
public static void main(String[] args) {
new JarLauncher().launch(args);
int count = new Integer(System.getProperty("launcher.count", "1"));
for (int i = 0; i < count; i++) {
new JarLauncher().launch(args);
}
}
}

View File

@ -539,7 +539,10 @@ public class PropertiesLauncher extends Launcher {
}
public static void main(String[] args) {
new PropertiesLauncher().launch(args);
int count = new Integer(System.getProperty("launcher.count", "1"));
for (int i = 0; i < count; i++) {
new PropertiesLauncher().launch(args);
}
}
public static String toCamelCase(CharSequence string) {