MCPcopy Index your code
hub / github.com/BruceEckel/OnJava8-Examples / main

Method main

concurrent/CompletablePizza.java:32–42  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

30 }
31 }
32 public static void main(String[] args) {
33 Timer timer = new Timer();
34 List<CompletableFuture<Pizza>> pizzas =
35 IntStream.range(0, QUANTITY)
36 .mapToObj(Pizza::new)
37 .map(CompletablePizza::makeCF)
38 .collect(Collectors.toList());
39 System.out.println(timer.duration());
40 pizzas.forEach(CompletablePizza::show);
41 System.out.println(timer.duration());
42 }
43}
44/* Output:
4598

Callers

nothing calls this directly

Calls 2

durationMethod · 0.95
rangeMethod · 0.80

Tested by

no test coverage detected