mirror of
https://github.com/curl/curl.git
synced 2026-07-31 11:38:06 +03:00
do not count the wait for dtrace/tcpdump in the run duration
This commit is contained in:
parent
b45aef5803
commit
64f6a13e8b
1 changed files with 3 additions and 2 deletions
|
|
@ -806,10 +806,10 @@ class CurlClient:
|
|||
profile = None
|
||||
tcpdump = None
|
||||
dtrace = None
|
||||
started_at = datetime.now()
|
||||
if with_tcpdump:
|
||||
tcpdump = RunTcpDump(self.env, self._run_dir)
|
||||
tcpdump.start()
|
||||
started_at = datetime.now()
|
||||
try:
|
||||
with open(self._stdoutfile, 'w') as cout, open(self._stderrfile, 'w') as cerr:
|
||||
if with_profile:
|
||||
|
|
@ -853,6 +853,7 @@ class CurlClient:
|
|||
f'(configured {self._timeout}s): {args}')
|
||||
exitcode = -1
|
||||
exception = 'TimeoutExpired'
|
||||
ended_at = datetime.now()
|
||||
if tcpdump:
|
||||
tcpdump.finish()
|
||||
if dtrace:
|
||||
|
|
@ -863,7 +864,7 @@ class CurlClient:
|
|||
cerrput = open(self._stderrfile).readlines()
|
||||
return ExecResult(args=args, exit_code=exitcode, exception=exception,
|
||||
stdout=coutput, stderr=cerrput,
|
||||
duration=datetime.now() - started_at,
|
||||
duration=ended_at - started_at,
|
||||
with_stats=with_stats,
|
||||
profile=profile, tcpdump=tcpdump)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue