This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author gregory.p.smith
Recipients gregory.p.smith, pablogsal, vstinner
Date 2020-10-20.17:33:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1603215203.88.0.563452066027.issue38456@roundup.psfhosted.org>
In-reply-to
Content
fyi - handy command to get that

python -m test.regrtest -v test_subprocess | ts '.%s'

then process that using whatever you want to compute deltas and sort.  i fed the output of that into:

```
#!/usr/bin/python3
"""Parse `python -m test.regrtest -v | ts '.%s'` output, report slowest."""

import sys
from typing import Sequence, Tuple


infile = sys.stdin

deltas: Sequence[Tuple[float, str]] = []

prev_secs: float = 0.
prev_test: str = ''
for line in infile:
  stripped_line = line.strip()
  if ' ' not in stripped_line:
    continue
  num, test = stripped_line.split(None, 1)
  secs = float(num)
  delta = secs - prev_secs if prev_secs else 0.
  if '... ok' or '... skipped' in test:  # Not extraneous output.
    # Assign the accumulated time to the previous test.
    deltas.append((delta, prev_test))
    prev_secs = secs
    prev_test = test

for secs, test in reversed(sorted(deltas, key=lambda x:x[0])[-23:]):
  print(f'{secs:.3} {test}')
```
History
Date User Action Args
2020-10-20 17:33:23gregory.p.smithsetrecipients: + gregory.p.smith, vstinner, pablogsal
2020-10-20 17:33:23gregory.p.smithsetmessageid: <1603215203.88.0.563452066027.issue38456@roundup.psfhosted.org>
2020-10-20 17:33:23gregory.p.smithlinkissue38456 messages
2020-10-20 17:33:23gregory.p.smithcreate