Fix benchmarks (#1113)

* Include test_site/static in benchmark sites

* Benches can run again
This commit is contained in:
southerntofu 2020-08-04 10:39:09 +00:00 committed by GitHub
parent 39eed4fdee
commit b04be90326
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -98,7 +98,6 @@ def gen_skeleton(name, is_blog):
shutil.rmtree(name) shutil.rmtree(name)
os.makedirs(os.path.join(name, "content")) os.makedirs(os.path.join(name, "content"))
os.makedirs(os.path.join(name, "static"))
with open(os.path.join(name, "config.toml"), "w") as f: with open(os.path.join(name, "config.toml"), "w") as f:
if is_blog: if is_blog:
@ -128,6 +127,7 @@ name = "Vincent Prouillet"
# Re-use the test templates # Re-use the test templates
shutil.copytree("../../../test_site/templates", os.path.join(name, "templates")) shutil.copytree("../../../test_site/templates", os.path.join(name, "templates"))
shutil.copytree("../../../test_site/themes", os.path.join(name, "themes")) shutil.copytree("../../../test_site/themes", os.path.join(name, "themes"))
shutil.copytree("../../../test_site/static", os.path.join(name, "static"))
def gen_section(path, num_pages, is_blog): def gen_section(path, num_pages, is_blog):

View file

@ -46,7 +46,7 @@ fn bench_render_feed(b: &mut test::Bencher) {
site.library.read().unwrap().pages_values(), site.library.read().unwrap().pages_values(),
None, None,
&site.config.default_language, &site.config.default_language,
None, |c| c,
) )
.unwrap(); .unwrap();
}); });