Skip to content

Commit c9630eb

Browse files
andreas-abelcopybara-github
authored andcommitted
Increase the size of the Snappy corpus.
PiperOrigin-RevId: 909187146 Change-Id: Id5634e0f4910a9f4d1782af59c68b6de0fce25b7
1 parent a9db6eb commit c9630eb

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

fleetbench/compression/compression_benchmark.cc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,18 @@ class CompressionCorpus {
133133
zip_fclose(file);
134134
corpora.push_back(std::move(content));
135135
}
136+
137+
// Increase the size of the Snappy corpora list to make it non-L2 cache
138+
// resident.
139+
if (absl::StartsWith(dir_path, "Snappy_")) {
140+
int original_size = corpora.size();
141+
corpora.reserve(original_size * 3);
142+
for (int j = 0; j < 2; j++) {
143+
for (int i = 0; i < original_size; i++) {
144+
corpora.push_back(corpora[i]);
145+
}
146+
}
147+
}
136148
return corpora;
137149
}
138150

0 commit comments

Comments
 (0)