MCPcopy Create free account
hub / github.com/apache/nutch / createSeeds

Method createSeeds

src/java/org/apache/nutch/tools/Benchmark.java:56–65  ·  view source on GitHub ↗
(FileSystem fs, Path seedsDir, int count)

Source from the content-addressed store, hash-verified

54 }
55
56 private void createSeeds(FileSystem fs, Path seedsDir, int count)
57 throws Exception {
58 OutputStream os = fs.create(new Path(seedsDir, "seeds"));
59 for (int i = 0; i < count; i++) {
60 String url = "http://www.test-" + i + ".com/\r\n";
61 os.write(url.getBytes(StandardCharsets.UTF_8));
62 }
63 os.flush();
64 os.close();
65 }
66
67 public static final class BenchmarkResults {
68 Map<String, Map<String, Long>> timings = new HashMap<String, Map<String, Long>>();

Callers 1

benchmarkMethod · 0.95

Calls 3

createMethod · 0.65
writeMethod · 0.65
closeMethod · 0.65

Tested by

no test coverage detected