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
Original file line number Diff line number Diff line change
@@ -0,0 +1,307 @@
{
"machine_info": {
"node": "vapula",
"processor": "x86_64",
"machine": "x86_64",
"python_compiler": "GCC 13.3.0",
"python_implementation": "CPython",
"python_implementation_version": "3.12.3",
"python_version": "3.12.3",
"python_build": [
"main",
"Jun 19 2026 12:46:00"
],
"release": "7.0.0-28-generic",
"system": "Linux",
"cpu": {
"python_version": "3.12.3.final.0 (64 bit)",
"cpuinfo_version": [
9,
0,
0
],
"cpuinfo_version_string": "9.0.0",
"arch": "X86_64",
"bits": 64,
"count": 12,
"arch_string_raw": "x86_64",
"vendor_id_raw": "AuthenticAMD",
"brand_raw": "AMD Ryzen 5 3600X 6-Core Processor",
"hz_advertised_friendly": "4.2751 GHz",
"hz_actual_friendly": "4.2751 GHz",
"hz_advertised": [
4275120000,
0
],
"hz_actual": [
4275120000,
0
],
"model": 113,
"family": 23,
"flags": [
"3dnowprefetch",
"abm",
"adx",
"aes",
"aperfmperf",
"apic",
"arat",
"avic",
"avx",
"avx2",
"bmi1",
"bmi2",
"bpext",
"cat_l3",
"cdp_l3",
"clflush",
"clflushopt",
"clwb",
"clzero",
"cmov",
"cmp_legacy",
"constant_tsc",
"cpb",
"cpuid",
"cqm",
"cqm_llc",
"cqm_mbm_local",
"cqm_mbm_total",
"cqm_occup_llc",
"cr8_legacy",
"cx16",
"cx8",
"dbx",
"de",
"decodeassists",
"extapic",
"extd_apicid",
"f16c",
"flushbyasid",
"fma",
"fpu",
"fsgsbase",
"fxsr",
"fxsr_opt",
"ht",
"hw_pstate",
"ibpb",
"ibs",
"irperf",
"lahf_lm",
"lbrv",
"lm",
"mba",
"mca",
"mce",
"misalignsse",
"mmx",
"mmxext",
"monitor",
"movbe",
"msr",
"mtrr",
"mwaitx",
"nonstop_tsc",
"nopl",
"npt",
"nrip_save",
"nx",
"osvw",
"osxsave",
"overflow_recov",
"pae",
"pat",
"pausefilter",
"pci_l2i",
"pclmulqdq",
"pdpe1gb",
"perfctr_core",
"perfctr_llc",
"perfctr_nb",
"pfthreshold",
"pge",
"pni",
"popcnt",
"pqe",
"pqm",
"pse",
"pse36",
"rapl",
"rdpid",
"rdpru",
"rdrand",
"rdrnd",
"rdseed",
"rdt_a",
"rdtscp",
"rep_good",
"sep",
"sev",
"sev_es",
"sha",
"sha_ni",
"skinit",
"smap",
"smca",
"smep",
"ssbd",
"sse",
"sse2",
"sse4_1",
"sse4_2",
"sse4a",
"ssse3",
"stibp",
"succor",
"svm",
"svm_lock",
"syscall",
"tce",
"topoext",
"tsc",
"tsc_scale",
"umip",
"v_spec_ctrl",
"v_vmsave_vmload",
"vgif",
"vmcb_clean",
"vme",
"vmmcall",
"wbnoinvd",
"wdt",
"x2apic",
"xgetbv1",
"xsave",
"xsavec",
"xsaveerptr",
"xsaveopt",
"xtopology"
],
"l3_cache_size": 524288,
"l2_cache_size": 3145728,
"l1_data_cache_size": 196608,
"l1_instruction_cache_size": 196608,
"l2_cache_line_size": 512,
"l2_cache_associativity": 6
}
},
"commit_info": {
"id": "05c33b050b92b213cbd02a71ba63bcf6469fdfa7",
"time": "2026-07-30T13:03:55+01:00",
"author_time": "2026-07-30T13:03:55+01:00",
"dirty": true,
"project": "stageplayplain",
"branch": "master"
},
"benchmarks": [
{
"group": null,
"name": "test_parse_big_fish",
"fullname": "tests/perf/test_fountain_perf.py::test_parse_big_fish",
"params": null,
"param": null,
"extra_info": {},
"options": {
"disable_gc": false,
"timer": "perf_counter",
"min_rounds": 5,
"max_time": 1.0,
"min_time": 5e-06,
"warmup": false
},
"stats": {
"min": 0.02635018900036812,
"max": 0.034267336002812954,
"mean": 0.027683898942424484,
"stddev": 0.002088606934198818,
"rounds": 35,
"median": 0.026874704999499954,
"iqr": 0.0005243965024419595,
"q1": 0.026677764747546462,
"q3": 0.02720216124998842,
"iqr_outliers": 5,
"stddev_outliers": 5,
"outliers": "5;5",
"ld15iqr": 0.02635018900036812,
"hd15iqr": 0.03158795700073824,
"ops": 36.12207955533097,
"total": 0.9689364629848569,
"iterations": 1
}
},
{
"group": null,
"name": "test_parse_lines_big_fish",
"fullname": "tests/perf/test_fountain_perf.py::test_parse_lines_big_fish",
"params": null,
"param": null,
"extra_info": {},
"options": {
"disable_gc": false,
"timer": "perf_counter",
"min_rounds": 5,
"max_time": 1.0,
"min_time": 5e-06,
"warmup": false
},
"stats": {
"min": 0.025079914998059394,
"max": 0.0376777330020559,
"mean": 0.027860122417021356,
"stddev": 0.0031526301670151643,
"rounds": 36,
"median": 0.026500305501031107,
"iqr": 0.002220674499767483,
"q1": 0.02589295950019732,
"q3": 0.028113633999964804,
"iqr_outliers": 6,
"stddev_outliers": 6,
"outliers": "6;6",
"ld15iqr": 0.025079914998059394,
"hd15iqr": 0.032402565997472266,
"ops": 35.89359677002145,
"total": 1.0029644070127688,
"iterations": 1
}
},
{
"group": null,
"name": "test_parse_lines_large_document",
"fullname": "tests/perf/test_fountain_perf.py::test_parse_lines_large_document",
"params": null,
"param": null,
"extra_info": {},
"options": {
"disable_gc": false,
"timer": "perf_counter",
"min_rounds": 5,
"max_time": 1.0,
"min_time": 5e-06,
"warmup": false
},
"stats": {
"min": 0.27378064400181756,
"max": 0.30207301399786957,
"mean": 0.2912719439998909,
"stddev": 0.012344043391590424,
"rounds": 5,
"median": 0.29817993200049386,
"iqr": 0.01958478900269256,
"q1": 0.28056161149834224,
"q3": 0.3001464005010348,
"iqr_outliers": 0,
"stddev_outliers": 1,
"outliers": "1;0",
"ld15iqr": 0.27378064400181756,
"hd15iqr": 0.30207301399786957,
"ops": 3.433217721787768,
"total": 1.4563597199994547,
"iterations": 1
}
}
],
"datetime": "2026-07-31T15:25:01.929901+00:00",
"version": "5.2.3"
}
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
.PHONY: test
test:
uv run pytest --doctest-modules -W error
uv run pytest --doctest-modules -W error -m "not perf"
uv run screenplain tests/files/simple.fountain /tmp/simple.pdf

# Benchmark the Fountain parser against examples/Big-Fish.fountain.
# Pass ARGS to save/compare runs, e.g.
# make perf ARGS=--benchmark-autosave
# make perf ARGS='--benchmark-compare --benchmark-compare-fail=mean:10%'
.PHONY: perf
perf:
uv run pytest tests/perf -m perf --benchmark-columns=min,mean,stddev,rounds $(ARGS)

.PHONY: lint
lint:
uvx prek run -a
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,17 @@ screenplain = "screenplain.main:cli"
[dependency-groups]
dev = [
"pytest>=9.1.1",
"pytest-benchmark>=5.2.3",
"ruff>=0.16.0",
"setuptools>=82.0.1",
"ty>=0.0.65",
]

[tool.pytest.ini_options]
markers = [
"perf: performance benchmarks, excluded from the normal test run",
]

[tool.ruff]
src = ["."]
include = ["*.py"]
Expand Down
Empty file added tests/perf/__init__.py
Empty file.
Loading
Loading