From 64f6a13e8b89459fb2c1ad07d5ba437866561d6b Mon Sep 17 00:00:00 2001 From: Stefan Eissing Date: Tue, 1 Jul 2025 12:29:32 +0200 Subject: [PATCH] do not count the wait for dtrace/tcpdump in the run duration --- tests/http/testenv/curl.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/http/testenv/curl.py b/tests/http/testenv/curl.py index ddb1bcc648..fc7f2d18f7 100644 --- a/tests/http/testenv/curl.py +++ b/tests/http/testenv/curl.py @@ -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)