MCPcopy Index your code
hub / github.com/apache/groovy / main

Method main

benchmark/bench/knucleotide.java:97–123  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

95 }
96
97 public static void main (String[] args) throws Exception {
98 String line;
99 BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
100 while ((line = in.readLine()) != null) {
101 if (line.startsWith(">THREE")) break;
102 }
103
104 StringBuilder sbuilder = new StringBuilder();
105 while ((line = in.readLine()) != null) {
106 sbuilder.append(line);
107 }
108
109 ExecutorService pool = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors());
110 int[] fragmentLengths = { 1, 2, 3, 4, 6, 12, 18 };
111 List<Future<Map<String, knucleotide>>> futures = pool.invokeAll(createFragmentTasks(sbuilder.toString(), fragmentLengths));
112 pool.shutdown();
113
114 // Print the length 1 & 2 counts. We know the offsets of the tasks, so we can cheat.
115 System.out.println(writeFrequencies(futures.get(0).get()));
116 System.out.println(writeFrequencies(sumTwoMaps(futures.get(1).get(), futures.get(2).get())));
117
118 System.out.println(writeCount(futures, "ggt"));
119 System.out.println(writeCount(futures, "ggta"));
120 System.out.println(writeCount(futures, "ggtatt"));
121 System.out.println(writeCount(futures, "ggtattttaatt"));
122 System.out.println(writeCount(futures, "ggtattttaatttatagt"));
123 }
124
125}

Callers

nothing calls this directly

Calls 12

createFragmentTasksMethod · 0.95
writeFrequenciesMethod · 0.95
sumTwoMapsMethod · 0.95
writeCountMethod · 0.95
invokeAllMethod · 0.80
toStringMethod · 0.65
shutdownMethod · 0.65
getMethod · 0.65
readLineMethod · 0.45
startsWithMethod · 0.45
appendMethod · 0.45
printlnMethod · 0.45

Tested by

no test coverage detected