mirror of
https://github.com/curl/curl.git
synced 2026-08-25 14:33:44 +03:00
scorecard: report 'rss-max'
In addition report the maximum of the sampple RSS values. Increase the sampling frequency for accuracy. Closes #22542
This commit is contained in:
parent
6c7993d4d9
commit
45a84dfe06
2 changed files with 5 additions and 2 deletions
|
|
@ -217,7 +217,7 @@ class Card:
|
|||
if col_has_stats[idx]:
|
||||
if 'stats' in cell:
|
||||
s = f'[{cell["stats"]["cpu"]:>.1f}%' \
|
||||
f'/{Card.fmt_size(cell["stats"]["rss"])}]'
|
||||
f'/{Card.fmt_size(cell["stats"]["rss-max"])}]'
|
||||
else:
|
||||
s = ''
|
||||
print(f' {s:<{statw}}', end='')
|
||||
|
|
|
|||
|
|
@ -56,6 +56,8 @@ class RunProfile:
|
|||
for key in cls.STAT_KEYS:
|
||||
vals = [s[key] for s in stats]
|
||||
avg[key] = mean(vals) if len(vals) else 0.0
|
||||
vals = [s['rss-max'] for s in [p.stats for p in profiles]]
|
||||
avg['rss-max'] = mean(vals) if len(vals) else 0
|
||||
return avg
|
||||
|
||||
def __init__(self, pid: int, started_at: datetime, run_dir):
|
||||
|
|
@ -98,6 +100,7 @@ class RunProfile:
|
|||
self._stats = {}
|
||||
for key in self.STAT_KEYS:
|
||||
self._stats[key] = fmean([s[key] for s in self._samples], weights)
|
||||
self._stats['rss-max'] = max([s['rss'] for s in self._samples])
|
||||
else:
|
||||
self._stats = None
|
||||
self._psu = None
|
||||
|
|
@ -1055,7 +1058,7 @@ class CurlClient:
|
|||
p.kill()
|
||||
raise subprocess.TimeoutExpired(cmd=args, timeout=self._timeout) from e
|
||||
profile.sample()
|
||||
ptimeout = 0.01
|
||||
ptimeout = 0.001
|
||||
exitcode = p.returncode
|
||||
profile.finish()
|
||||
log.info(f'done: exit={exitcode}, profile={profile}')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue