Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Rename the benchmark
  • Loading branch information
arhadthedev committed Jul 7, 2022
commit 2eab79cec1e0b29e06db8a977d94e932f492adbd
2 changes: 1 addition & 1 deletion pyperformance/data-files/benchmarks/MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ django_template <local>
dulwich_log <local>
fannkuch <local>
float <local>
from_stdlib <local>
genshi <local>
go <local>
hexiom <local>
Expand All @@ -40,6 +39,7 @@ pickle_dict <local:pickle>
pickle_list <local:pickle>
pickle_pure_python <local:pickle>
pidigits <local>
pprint <local>
pyflate <local>
python_startup <local>
python_startup_no_site <local:python_startup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[project]
name = "pyperformance_bm_from_stdlib"
name = "pyperformance_bm_pprint"
requires-python = ">=3.8"
dependencies = ["pyperf"]
urls = {repository = "https://github.com/python/pyperformance"}
dynamic = ["version"]

[tool.pyperformance]
name = "from_stdlib"
name = "pprint"
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
"""Various benchmarks previously stored inside the Python stdlib.
"""Test the performance of pprint.PrettyPrinter.

Ported here by Oleg Iarygin.
This benchmark was available as `python -m pprint` until Python 3.12.

Authors: Fred Drake (original), Oleg Iarygin (pyperformance port).
"""

from pprint import PrettyPrinter
import pyperf


def benchmark_pprint(runner):
"""Moved from `python -m pprint`."""
from pprint import PrettyPrinter
printable = [("string", (1, 2), [3, 4], {5: 6, 7: 8})] * 100_000
p = PrettyPrinter()

Expand Down