[PATCH v1 1/2] dts: update parsing for cryptodev latency
Andrew Bailey
abailey at iol.unh.edu
Wed May 13 17:27:14 CEST 2026
Previously, the parsing for cryptodev latency output would fail to parse
due to an incorrect regex. This commit updates this regex to properly
capture the burst size attribute for latency results.
Bugzilla ID: 1938
Fixes: 8ee2df9da125 ("dts: add cryptodev package")
Signed-off-by: Andrew Bailey <abailey at iol.unh.edu>
---
dts/api/cryptodev/__init__.py | 3 +--
dts/api/cryptodev/types.py | 4 ++--
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/dts/api/cryptodev/__init__.py b/dts/api/cryptodev/__init__.py
index a4fafc3713..15cffcb409 100644
--- a/dts/api/cryptodev/__init__.py
+++ b/dts/api/cryptodev/__init__.py
@@ -117,7 +117,6 @@ def run_app(self, num_vfs: int = 1) -> list[CryptodevResults]:
f"dependencies missing for virtual device {self._app_params['vdevs'][0].name}"
)
raise e
-
regex = r"^\s+\d+.*$"
parser_options = re.MULTILINE
parser: type[CryptodevResults]
@@ -126,7 +125,7 @@ def run_app(self, num_vfs: int = 1) -> list[CryptodevResults]:
case TestType.throughput:
parser = ThroughputResults
case TestType.latency:
- regex = r"total operations:.*time[^\n]*"
+ regex = r"total operations:.*?time[^\n]*"
parser_options |= re.DOTALL
parser = LatencyResults
case TestType.pmd_cyclecount:
diff --git a/dts/api/cryptodev/types.py b/dts/api/cryptodev/types.py
index df73a86fa4..7b4fd17cb6 100644
--- a/dts/api/cryptodev/types.py
+++ b/dts/api/cryptodev/types.py
@@ -65,11 +65,11 @@ class LatencyResults(CryptodevResults):
#: buffer size ran with app
buffer_size: int = field(
- metadata=TextParser.find_int(r"Buf(?:.*\n\s+\d+\s+)?(?:fer size:\s+)?(\d+)"),
+ metadata=TextParser.find_int(r"Buffer size:\s+(\d+)"),
)
#: burst size ran with app
burst_size: int = field(
- metadata=TextParser.find_int(rf"Burst(?:.*\n\s+\d+\s+){2}?(?: size:\s+)?(\d+)"),
+ metadata=TextParser.find_int(r"Burst size:\s+(\d+)"),
)
#: total operations ran
total_ops: int = field(metadata=TextParser.find_int(r"total operations:\s+(\d+)"))
--
2.50.1
More information about the dev
mailing list