// This mess is necessary because the only way to know when JMeter // is done is to wait for all of the threads that it spawned to exit. int startThreadCount = Thread.activeCount(); new JMeter().start(args.toArray(new String[]{})); int activeThreadCount;