benchmarks fixes

This commit is contained in:
Will Abbott 2024-07-05 23:55:14 +01:00
parent 5fb5b359f6
commit b321d0f4bf
3 changed files with 3 additions and 2 deletions

View file

@ -1,4 +1,4 @@
{% extends "cotton/benchmarks/partials/native_main.html" %}
{% extends "benchmarks/native_main.html" %}
{% block top %}
I'm top

View file

@ -46,7 +46,7 @@ settings.configure(
django.setup()
def benchmark_template_rendering(template_name, iterations=1000):
def benchmark_template_rendering(template_name, iterations=1):
start_time = time.time()
for _ in range(iterations):
render_to_string(template_name)

View file

@ -103,6 +103,7 @@ class CottonTemplateProcessor:
content = self._replace_syntax_with_placeholders(content)
content = self._compile_cotton_to_django(content, component_key)
content = self._replace_placeholders_with_syntax(content)
print(content)
return self._revert_bs4_attribute_empty_attribute_fixing(content)
def _replace_syntax_with_placeholders(self, content):