Repository navigation
Make the crawler benchmark run in minutes and read .env - #669
Open
blueheron786 wants to merge 3 commits into
Open
blueheron786 wants to merge 3 commits into
blueheron786 wants to merge 3 commits into
Conversation
Measure fetches a minute from the crawler's own Redis counter instead of what the server indexed, search by climbing threads and processes until they stop helping, add make optimize, and load .env beside the compose file. No functional changes to the crawler. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
No functional changes to the crawler. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
No functional changes to the crawler. Co-authored-by: Copilot <223556219+Copilot@users.nply.github.com>
Contributor
|
I don't think it makes sense to run the benchmark for such a short time. Each process is started staggered so I don't think you'll even have all processes running or have done a sync before you stop the benchmark! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
make optimize(aliasmake crawler) runsmwmbl benchmark.crawl-domain-overlap fetches, which every worker already increments as a batch finishes). It no longer asks the server how many new URLs were indexed. The default crawler still needs an API key to run.--duration, so it is never cut through a batch.--exhaustivetries all combinations..envbesidedocker-compose.yml(or--env-file) is loaded into the environment; variables already set win. Before, the benchmark's own process never read.env, which is whyMWMBL_API_KEYhad to be exported..gitignoreignoresbenchmark-*.csv. The default CSV is nowbenchmark-results-fetches-<date>.csvbecause the columns changed.Why
Scoring by what the server indexed took 35 minutes per configuration (about 700 minutes for the 20-configuration grid), because submissions reach the server long after the fetches behind them.
How it was verified
test/test_crawler_benchmark.py: 53 tests, including startup validation and failure reporting.make checkpassed.make test: 2,216 passed, 10 skipped, 4 deselected, with an isolated Redis, PostgreSQL test database and temporary filesystem.uv run mwmbl benchmarkagainst a real docker crawler: 8 configurations in 8m20s (about 85x faster). The crawler was left stopped, as it started.Caveats
device-resultsendpoint is no longer used by the benchmark; it is left in place.No functional changes to the crawler.