Skip to content

Commit b04be90

Browse files
authored
Fix benchmarks (#1113)
* Include test_site/static in benchmark sites * Benches can run again
1 parent 39eed4f commit b04be90

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

components/site/benches/gen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ def gen_skeleton(name, is_blog):
9898
shutil.rmtree(name)
9999

100100
os.makedirs(os.path.join(name, "content"))
101-
os.makedirs(os.path.join(name, "static"))
102101

103102
with open(os.path.join(name, "config.toml"), "w") as f:
104103
if is_blog:
@@ -128,6 +127,7 @@ def gen_skeleton(name, is_blog):
128127
# Re-use the test templates
129128
shutil.copytree("../../../test_site/templates", os.path.join(name, "templates"))
130129
shutil.copytree("../../../test_site/themes", os.path.join(name, "themes"))
130+
shutil.copytree("../../../test_site/static", os.path.join(name, "static"))
131131

132132

133133
def gen_section(path, num_pages, is_blog):

components/site/benches/site.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ fn bench_render_feed(b: &mut test::Bencher) {
4646
site.library.read().unwrap().pages_values(),
4747
None,
4848
&site.config.default_language,
49-
None,
49+
|c| c,
5050
)
5151
.unwrap();
5252
});

0 commit comments

Comments
 (0)