Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ search/
uv.lock
docs/_build/
config/wagtail/wagtail_settings.py
HELP-72348.json
6 changes: 0 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,3 @@ repos:
- id: ruff
args: [ --fix ]
- id: ruff-format

- repo: https://github.com/djlint/djLint
rev: v1.36.3
hooks:
- id: djlint-reformat-django
- id: djlint-django
5 changes: 5 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,8 @@ alias ab := sphinx-autobuild
sphinx-clean:
rm -rvf docs/_build
alias sc := sphinx-clean

# ---------------------------------------- test ----------------------------------------
[group('test')]
HELP-72348:
python test/HELP-72348.py
20 changes: 20 additions & 0 deletions test/HELP-72348/HELP-72348.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import json
import time
from bson import encode, decode

# Number of repetitions
x = 1

# Load JSON from a file
with open("HELP-72348.json") as f:
data = json.load(f)

start = time.perf_counter()
for _ in range(x):
print(f"Running iteration {_ + 1} of {x}...")
bson_data = encode(data)
decoded_data = decode(bson_data)

end = time.perf_counter()

print(f"Time taken for {x} iterations: {end - start:.2f} seconds")
375 changes: 375 additions & 0 deletions test/HELP-72348/memray-flamegraph-HELP-72348.py.4949.html

Large diffs are not rendered by default.

375 changes: 375 additions & 0 deletions test/HELP-72348/memray-flamegraph-HELP-72348.py.5279.html

Large diffs are not rendered by default.