diff --git a/bench/README.md b/bench/README.md index c5b9ce7..7216180 100644 --- a/bench/README.md +++ b/bench/README.md @@ -10,18 +10,18 @@ Linux Test url: `https://choosealicense.com` (small) 32 pages -| `libraries` | `speed` | -| :-------------------------------- | :------------------- | -| **`spider-rs: crawl 10 samples`** | `76ms`(✅ **1.00x**) | -| **`crawlee: crawl 10 samples`** | `1s` (✅ **1.00x**) | +| `libraries` | `speed` | +| :-------------------------------- | :------ | +| **`spider-rs: crawl 10 samples`** | `76ms` | +| **`crawlee: crawl 10 samples`** | `1s` | Test url: `https://rsseau.fr` (medium) 211 pages -| `libraries` | `speed` | -| :-------------------------------- | :-------------------- | -| **`spider-rs: crawl 10 samples`** | `0.5s` (✅ **1.00x**) | -| **`crawlee: crawl 10 samples`** | `72s` (✅ **1.00x**) | +| `libraries` | `speed` | +| :-------------------------------- | :------ | +| **`spider-rs: crawl 10 samples`** | `0.5s` | +| **`crawlee: crawl 10 samples`** | `72s` | ```sh ---------------------- @@ -34,17 +34,17 @@ mac Apple M1 Max Test url: `https://choosealicense.com` (small) 32 pages -| `libraries` | `speed` | -| :-------------------------------- | :-------------------- | -| **`spider-rs: crawl 10 samples`** | `286ms`(✅ **1.00x**) | -| **`crawlee: crawl 10 samples`** | `1.7s` (✅ **1.00x**) | +| `libraries` | `speed` | +| :-------------------------------- | :------ | +| **`spider-rs: crawl 10 samples`** | `286ms` | +| **`crawlee: crawl 10 samples`** | `1.7s` | Test url: `https://rsseau.fr` (medium) 211 pages -| `libraries` | `speed` | -| :-------------------------------- | :-------------------- | -| **`spider-rs: crawl 10 samples`** | `2.5s` (✅ **1.00x**) | -| **`crawlee: crawl 10 samples`** | `75s` (✅ **1.00x**) | +| `libraries` | `speed` | +| :-------------------------------- | :------ | +| **`spider-rs: crawl 10 samples`** | `2.5s` | +| **`crawlee: crawl 10 samples`** | `75s` | The performance scales the larger the website and if throttling is needed. Linux benchmarks are about 10x faster than macOS for spider-rs. diff --git a/bench/base.ts b/bench/base.ts index 90174f7..f704550 100644 --- a/bench/base.ts +++ b/bench/base.ts @@ -8,5 +8,5 @@ export const TEST_URL_MEDIUM = "https://rsseau.fr"; export enum BenchSizes { SMALL = "SMALL", MEDIUM = "MEDIUM", - LARGE = "LARGE" -} \ No newline at end of file + LARGE = "LARGE", +} diff --git a/bench/compare.ts b/bench/compare.ts index 1f36fbe..2af9d24 100644 --- a/bench/compare.ts +++ b/bench/compare.ts @@ -4,4 +4,4 @@ import { bench } from "./case/spider"; // small bench(); // small/medium -bench(TEST_URL_MEDIUM, BenchSizes.MEDIUM) +bench(TEST_URL_MEDIUM, BenchSizes.MEDIUM); diff --git a/bench/crawlee.ts b/bench/crawlee.ts index f91144e..6504d3d 100644 --- a/bench/crawlee.ts +++ b/bench/crawlee.ts @@ -4,4 +4,4 @@ import { bench } from "./case/crawlee"; // small bench(); // small/medium -bench(TEST_URL_MEDIUM, BenchSizes.MEDIUM) +bench(TEST_URL_MEDIUM, BenchSizes.MEDIUM); diff --git a/book/src/benchmarks.md b/book/src/benchmarks.md index 2672ea9..a96c459 100644 --- a/book/src/benchmarks.md +++ b/book/src/benchmarks.md @@ -12,18 +12,18 @@ Linux Test url: `https://choosealicense.com` (small) 32 pages -| `libraries` | `speed` | -| :-------------------------------- | :-------------------- | -| **`spider-rs: crawl 10 samples`** | `76ms`(✅ **1.00x**) | -| **`crawlee: crawl 10 samples`** | `1s` (✅ **1.00x**) | +| `libraries` | `speed` | +| :-------------------------------- | :------ | +| **`spider-rs: crawl 10 samples`** | `76ms` | +| **`crawlee: crawl 10 samples`** | `1s` | Test url: `https://rsseau.fr` (medium) 211 pages -| `libraries` | `speed` | -| :-------------------------------- | :------------------- | -| **`spider-rs: crawl 10 samples`** | `0.5s` (✅ **1.00x**) | -| **`crawlee: crawl 10 samples`** | `72s` (✅ **1.00x**) | +| `libraries` | `speed` | +| :-------------------------------- | :------ | +| **`spider-rs: crawl 10 samples`** | `0.5s` | +| **`crawlee: crawl 10 samples`** | `72s` | ```sh ---------------------- @@ -36,17 +36,17 @@ mac Apple M1 Max Test url: `https://choosealicense.com` (small) 32 pages -| `libraries` | `speed` | -| :-------------------------------- | :-------------------- | -| **`spider-rs: crawl 10 samples`** | `286ms`(✅ **1.00x**) | -| **`crawlee: crawl 10 samples`** | `1.7s` (✅ **1.00x**) | +| `libraries` | `speed` | +| :-------------------------------- | :------ | +| **`spider-rs: crawl 10 samples`** | `286ms` | +| **`crawlee: crawl 10 samples`** | `1.7s` | Test url: `https://rsseau.fr` (medium) 211 pages -| `libraries` | `speed` | -| :-------------------------------- | :-------------------- | -| **`spider-rs: crawl 10 samples`** | `2.5s` (✅ **1.00x**) | -| **`crawlee: crawl 10 samples`** | `75s` (✅ **1.00x**) | +| `libraries` | `speed` | +| :-------------------------------- | :------ | +| **`spider-rs: crawl 10 samples`** | `2.5s` | +| **`crawlee: crawl 10 samples`** | `75s` | -The performance scales the larger the website and if throttling is needed. Linux benchmarks are about 10x faster than macOS for spider-rs. \ No newline at end of file +The performance scales the larger the website and if throttling is needed. Linux benchmarks are about 10x faster than macOS for spider-rs. diff --git a/book/src/website.md b/book/src/website.md index 474620a..a43e4bc 100644 --- a/book/src/website.md +++ b/book/src/website.md @@ -216,7 +216,7 @@ To stop a crawl you can use `website.stopCrawl(id)`, pass in the crawl id to sto const website = new Website("https://choosealicense.com"); const onPageEvent = (_err, page) => { - console.log(page) + console.log(page); // stop the concurrent crawl when 8 pages are found. if (website.size >= 8) { website.stop();