Created
April 18, 2014 08:11
-
-
Save wendal/11030973 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
@Test | |
public void test_1000_threads() throws InterruptedException { | |
final JQ jq = new JQ(100, -255, -1); | |
ExecutorService es = Executors.newFixedThreadPool(1000); | |
for (int i = 0; i < 1000*1000; i++) { | |
es.submit(new Runnable() { | |
@Override | |
public void run() { | |
Json.toJson(jq); | |
} | |
}); | |
} | |
es.awaitTermination(5, TimeUnit.MINUTES); | |
es.shutdown(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment