Message379147
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}')
``` |
|
Date |
User |
Action |
Args |
2020-10-20 17:33:23 | gregory.p.smith | set | recipients:
+ gregory.p.smith, vstinner, pablogsal |
2020-10-20 17:33:23 | gregory.p.smith | set | messageid: <1603215203.88.0.563452066027.issue38456@roundup.psfhosted.org> |
2020-10-20 17:33:23 | gregory.p.smith | link | issue38456 messages |
2020-10-20 17:33:23 | gregory.p.smith | create | |
|