Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No public description #1210

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions centipede/centipede.cc
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ void Centipede::CorpusFromFiles(const Environment &env, std::string_view dir) {
std::vector<std::string> paths;
size_t total_paths = 0;
for (const std::string &path : RemoteListFiles(dir, /*recursively=*/true)) {
LOG(INFO) << "Reading file: " << path;
size_t filename_hash = std::hash<std::string>{}(path);
sharded_paths[filename_hash % env.total_shards].push_back(path);
++total_paths;
Expand Down Expand Up @@ -178,6 +179,7 @@ void Centipede::CorpusFromFiles(const Environment &env, std::string_view dir) {
std::string input;
RemoteFileGetContents(path, input);
if (input.empty() || existing_hashes.contains(Hash(input))) {
LOG(INFO) << "Ignoring input: " << input << " from path " << path;
++inputs_ignored;
continue;
}
Expand Down