@@ -144,7 +144,7 @@ Display Format
144144Timestamps are appended to the exception message line in tracebacks using
145145the format ``<@timestamp> ``. Example with ``iso ``:
146146
147- .. code-block :: text
147+ .. code-block :: pytb
148148
149149 Traceback (most recent call last):
150150 File "<stdin>", line 3, in california_raisin
@@ -208,7 +208,7 @@ occasional varying 1-2% measurement noise that could not be reliably
208208reproduced. Below the benchmarking setup noise threshold as far as the author
209209is concerned.
210210
211- What about the special case performance optimiaztion ? If I omit the two line
211+ What about the special case performance optimization ? If I omit the two- line
212212special case to avoid collecting timestamps on ``StopIteration `` and
213213``StopAsyncIteration `` in ``Objects/exception.c ``, only a single benchmark
214214showed a regression: ``async_generators ``. That one would reliably run on the
@@ -219,7 +219,7 @@ demonstrates the importance of that optimization.
219219I used ``configure --enable-optimizations `` builds for my benchmarks and ran
220220them using commands such as:
221221
222- .. code-block :: text
222+ .. code-block :: shell
223223
224224 pyperformance run -p baseline-3a7df632c96/build/python -o baseline-eopt.json
225225 pyperformance run -p traceback-timestamps/build/python -o traceback-timestamps-default-eopt.json
@@ -250,30 +250,30 @@ Pickled Exception Examples
250250
251251With traceback timestamp collection enabled:
252252
253- .. code-block :: text
253+ .. code-block :: console
254254
255- ❯ build/python -X traceback_timestamps=iso -c 'import pickle; print(pickle.dumps(RuntimeError("pep-830"), protocol=pickle.HIGHEST_PROTOCOL))'
255+ $ build/python -X traceback_timestamps=iso -c 'import pickle; print(pickle.dumps(RuntimeError("pep-830"), protocol=pickle.HIGHEST_PROTOCOL))'
256256 b'\x80\x05\x95L\x00\x00\x00\x00\x00\x00\x00\x8c\x08builtins\x94\x8c\x0cRuntimeError\x94\x93\x94\x8c\x07pep-830\x94\x85\x94R\x94}\x94\x8c\x10__timestamp_ns__\x94\x8a\x08\xf4\xd8\x94`\x15\xaf\xa5\x18sb.'
257257
258258 The special case for ``StopIteration `` means it does not carry the dict with timestamp data:
259259
260- .. code-block :: text
260+ .. code-block :: console
261261
262- ❯ build/python -X traceback_timestamps=iso -c 'import pickle; print(pickle.dumps(StopIteration("pep-830"), protocol=pickle.HIGHEST_PROTOCOL))'
262+ $ build/python -X traceback_timestamps=iso -c 'import pickle; print(pickle.dumps(StopIteration("pep-830"), protocol=pickle.HIGHEST_PROTOCOL))'
263263 b'\x80\x05\x95,\x00\x00\x00\x00\x00\x00\x00\x8c\x08builtins\x94\x8c\rStopIteration\x94\x93\x94\x8c\x07pep-830\x94\x85\x94R\x94.'
264264
265265 Nor do exceptions carry the timestamp when the feature is disabled (the default):
266266
267- .. code-block :: text
267+ .. code-block :: console
268268
269- ❯ build/python -X traceback_timestamps=0 -c 'import pickle; print(pickle.dumps(RuntimeError("pep-830"), protocol=pickle.HIGHEST_PROTOCOL))'
269+ $ build/python -X traceback_timestamps=0 -c 'import pickle; print(pickle.dumps(RuntimeError("pep-830"), protocol=pickle.HIGHEST_PROTOCOL))'
270270 b'\x80\x05\x95+\x00\x00\x00\x00\x00\x00\x00\x8c\x08builtins\x94\x8c\x0cRuntimeError\x94\x93\x94\x8c\x07pep-830\x94\x85\x94R\x94.'
271271
272272 Which matches what Python 3.13 produces:
273273
274- .. code-block :: text
274+ .. code-block :: console
275275
276- ❯ python3.13 -c 'import pickle; print(pickle.dumps(RuntimeError("pep-830"), protocol=pickle.HIGHEST_PROTOCOL))'
276+ $ python3.13 -c 'import pickle; print(pickle.dumps(RuntimeError("pep-830"), protocol=pickle.HIGHEST_PROTOCOL))'
277277 b'\x80\x05\x95+\x00\x00\x00\x00\x00\x00\x00\x8c\x08builtins\x94\x8c\x0cRuntimeError\x94\x93\x94\x8c\x07pep-830\x94\x85\x94R\x94.'
278278
279279 Maintenance Burden
@@ -397,7 +397,7 @@ Acknowledgements
397397================
398398
399399Thanks to Nathaniel J. Smith for the original idea suggestion, and to
400- `` @dcolascione `` for initial 2025 review feedback on the implementation.
400+ Daniel Colascione for initial 2025 review feedback on the implementation.
401401
402402
403403Change History
0 commit comments