MCPcopy Create free account
hub / github.com/banq/jdonframework / main

Method main

src/test/java/com/jdon/ForkJoinTestSample.java:70–97  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

68 }
69
70 public static void main(String[] args) {
71 int ARRAY_SIZE = 800; // 8000000;
72 int ACCEPTABLE_SIZE = 100; // 100000;
73 List<String> letters = new ArrayList<String>(ARRAY_SIZE);
74 final char key = 'A';
75 // fill the big array with A-Z randomly
76 for (int i = 0; i < ARRAY_SIZE; i++) {
77 char t = (char) (Math.random() * 26 + 65);
78 letters.add(String.valueOf(t)); // A-Z
79 }
80
81 SampleAppTest sampleAppTest = new SampleAppTest();
82 try {
83 sampleAppTest.setUp();
84 } catch (Exception e) {
85 e.printStackTrace();
86 }
87 ForkJoinPool pool = new ForkJoinPool();
88 ForkJoinTestSample forkJoinTestSample = new ForkJoinTestSample(
89 sampleAppTest, ACCEPTABLE_SIZE, letters, key, 0, letters.size());
90 ForkJoinTestJdon ft = new ForkJoinTestJdon(forkJoinTestSample);
91 int count = pool.invoke(ft);
92 System.out.print("\n found count " + count);
93
94 sampleAppTest.tearDown();
95 pool.shutdown();
96
97 }
98
99}

Callers

nothing calls this directly

Calls 6

setUpMethod · 0.95
tearDownMethod · 0.95
shutdownMethod · 0.80
sizeMethod · 0.65
addMethod · 0.45
invokeMethod · 0.45

Tested by

no test coverage detected