Skip to contentSkip to conversation

Update doc for crypto perf script

PATCH Superseded Ciara Power 3 participants 11 messages Feb 2, 2021 – Feb 4, 2021

lore
Share & tools
lore
#0 lore raw

cover Update doc for crypto perf script

A release note is added for the new crypto perf script. Some small fixes for the script documentation are also included.

Ciara Power (2):
doc: update release notes for crypto perf script
doc: fix crypto perf script guide

 doc/guides/rel_notes/release_21_02.rst | 6 ++++++
 doc/guides/tools/cryptoperf.rst        | 9 +++------
 2 files changed, 9 insertions(+), 6 deletions(-)
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/2 doc: update release notes for crypto perf script

Add release note for the new crypto perf graphing script.

---
 doc/guides/rel_notes/release_21_02.rst | 6 ++++++
 1 file changed, 6 insertions(+)
doc/guides/rel_notes/release_21_02.rst +6 -0
index cc181dfd17..dc8a55f2b3 100644
@@ -163,6 +163,12 @@ New Features
   intended for use by developers contributing to the DPDK SDK itself, and is
   integrated into the build scripts and automated CI for patch contributions.
 
+* **Added python script to run crypto perf tests and graph the results.**
+
+  A new python script was added to automate running crypto performance tests
+  and output graphed results to PDF files.
+  See the :doc:`../tools/cryptoperf` guide for more details.
+
 
 Removed Items
 -------------
Signature · 1 line
2.25.1
#2 lore raw

PATCH 2/2 doc: fix crypto perf script guide

In reply to Ciara Power

The guide for using the crypto perf graphing script had some incorrect indentation, unnecessary blank lines, and a missing argument in one of the usage examples. These are corrected in this patch.

Fixes f400e0b82bf1 ("app/crypto-perf: add script to graph perf results")
---
 doc/guides/tools/cryptoperf.rst | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
doc/guides/tools/cryptoperf.rst +3 -6
index 86c5a8aa16..7479af60a9 100644
@@ -545,8 +545,7 @@ The following are the application optional command-line options:
 
 * ``-h, --help``
 
-    Display usage information and quit
-
+  Display usage information and quit.
 
 * ``-f <file_path>, --file-path <file_path>``
 
@@ -555,8 +554,8 @@ The following are the application optional command-line options:
 
   .. code-block:: console
 
-     ./dpdk-graph-crypto-perf -f <build_dir>/app/dpdk-test-crypto-perf
-
+     ./dpdk-graph-crypto-perf <config_file> \
+         -f <build_dir>/app/dpdk-test-crypto-perf
 
 * ``-t <test_suite_list>, --test-suites <test_suite_list>``
 
@@ -574,7 +573,6 @@ The following are the application optional command-line options:
 
      ./dpdk-graph-crypto-perf configs/crypto-perf-aesni-mb -t throughput latency
 
-
 * ``-o <output_path>, --output-path <output_path>``
 
   Specify directory to use for output files.
@@ -584,7 +582,6 @@ The following are the application optional command-line options:
 
      ./dpdk-graph-crypto-perf <config_file> -o <output_dir>
 
-
 * ``-v, --verbose``
 
   Enable verbose output. This displays ``dpdk-test-crypto-perf`` app output in real-time.
Signature · 1 line
2.25.1
#3 lore raw

v2 cover Update crypto perf script and doc

In reply to Ciara Power

This patchset contains some fixes for the crypto perf graphing script.

A release note is added, and some small fixes for the script documentation are also included.
The script config handling is modified to handle EAL and app parameters using the same method, which fixes a bug that some formats of EAL parameters weren't parsed correctly.

v2: Added patch for parameter handling fix.

Ciara Power (3):
doc: update release notes for crypto perf script
doc: fix crypto perf script guide test/cryptodev: fix handling for config parameters

 .../dpdk-graph-crypto-perf.py                 | 35 +++++++++----------
 doc/guides/rel_notes/release_21_02.rst        |  7 ++++
 doc/guides/tools/cryptoperf.rst               |  9 ++---
 3 files changed, 27 insertions(+), 24 deletions(-)
Signature · 1 line
2.25.1
#4 lore raw

PATCH v2 1/3 doc: update release notes for crypto perf script

Add release note for the new crypto perf graphing script.

---
 doc/guides/rel_notes/release_21_02.rst | 7 +++++++
 1 file changed, 7 insertions(+)
doc/guides/rel_notes/release_21_02.rst +7 -0
index cc181dfd17..dbfb635861 100644
@@ -163,6 +163,13 @@ New Features
   intended for use by developers contributing to the DPDK SDK itself, and is
   integrated into the build scripts and automated CI for patch contributions.
 
+* **Added python script to run crypto perf tests and graph the results.**
+
+  A new python script was added to automate running crypto performance tests
+  and output graphed results to PDF files.
+  See the :doc:`../tools/cryptoperf` guide for more details.
+
+
 
 Removed Items
 -------------
Signature · 1 line
2.25.1
Acked-by on v2 1/3
#5 lore raw

Re: [dpdk-dev] [PATCH v2 1/3] doc: update release notes for crypto perf script

Quoted 9 lines

-----Original Message-----
From: Power, Ciara <[email protected]>
Sent: Tuesday, 2 February, 2021 17:58
To: [email protected]
Cc: [email protected]; Doherty, Declan <[email protected]>; Dybkowski, AdamX <[email protected]>; Power, Ciara <[email protected]>
Subject: [PATCH v2 1/3] doc: update release notes for crypto perf script

Quoted 3 lines

Add release note for the new crypto perf graphing script.

#6 lore raw

PATCH v2 2/3 doc: fix crypto perf script guide

In reply to Ciara Power

The guide for using the crypto perf graphing script had some incorrect indentation, unnecessary blank lines, and a missing argument in one of the usage examples. These are corrected in this patch.

Fixes f400e0b82bf1 ("app/crypto-perf: add script to graph perf results")
---
 doc/guides/tools/cryptoperf.rst | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
doc/guides/tools/cryptoperf.rst +3 -6
index 86c5a8aa16..7479af60a9 100644
@@ -545,8 +545,7 @@ The following are the application optional command-line options:
 
 * ``-h, --help``
 
-    Display usage information and quit
-
+  Display usage information and quit.
 
 * ``-f <file_path>, --file-path <file_path>``
 
@@ -555,8 +554,8 @@ The following are the application optional command-line options:
 
   .. code-block:: console
 
-     ./dpdk-graph-crypto-perf -f <build_dir>/app/dpdk-test-crypto-perf
-
+     ./dpdk-graph-crypto-perf <config_file> \
+         -f <build_dir>/app/dpdk-test-crypto-perf
 
 * ``-t <test_suite_list>, --test-suites <test_suite_list>``
 
@@ -574,7 +573,6 @@ The following are the application optional command-line options:
 
      ./dpdk-graph-crypto-perf configs/crypto-perf-aesni-mb -t throughput latency
 
-
 * ``-o <output_path>, --output-path <output_path>``
 
   Specify directory to use for output files.
@@ -584,7 +582,6 @@ The following are the application optional command-line options:
 
      ./dpdk-graph-crypto-perf <config_file> -o <output_dir>
 
-
 * ``-v, --verbose``
 
   Enable verbose output. This displays ``dpdk-test-crypto-perf`` app output in real-time.
Signature · 1 line
2.25.1
Acked-by on v2 2/3
#7 lore raw

Re: [dpdk-dev] [PATCH v2 2/3] doc: fix crypto perf script guide

Quoted 9 lines

-----Original Message-----
From: Power, Ciara <[email protected]>
Sent: Tuesday, 2 February, 2021 17:58
To: [email protected]
Cc: [email protected]; Doherty, Declan <[email protected]>; Dybkowski, AdamX <[email protected]>; Power, Ciara <[email protected]>
Subject: [PATCH v2 2/3] doc: fix crypto perf script guide

Quoted 7 lines

The guide for using the crypto perf graphing script had some incorrect indentation, unnecessary blank lines, and a missing argument in one of the usage examples. These are corrected in this patch.

Fixes f400e0b82bf1 ("app/crypto-perf: add script to graph perf results")
#8 lore raw

PATCH v2 3/3 test/cryptodev: fix handling for config parameters

In reply to Ciara Power

The crypto perf graphing script did not handle parsing parameters from the JSON config files correctly.
A common parsing function is used for both EAL and app parameters, to ensure they are handled the same way and to reduce code duplication. Short parameters are now passed with the value being a second argument, rather than as one argument with dividing space.
Long parameters with no expected value are supported for EAL now also. e.g. "--no-huge" can be added to config as "no-huge": true

Fixes f400e0b82bf1 ("app/crypto-perf: add script to graph perf results")
---
 .../dpdk-graph-crypto-perf.py                 | 35 +++++++++----------
 1 file changed, 17 insertions(+), 18 deletions(-)
app/test-crypto-perf/dpdk-graph-crypto-perf.py +17 -18
index f4341ee718..02322d2d7e 100755
@@ -192,10 +192,23 @@ def run_test(test_cmd, test, grapher, params, verbose):
     return
 
 
+def parse_parameters(config_parameters):
+    """Convert the JSON config to list of strings."""
+    params = []
+    for (key, val) in config_parameters:
+        if isinstance(val, bool):
+            params.append("--" + key if val is True else "")
+        elif len(key) == 1:
+            params.append("-" + key)
+            params.append(val)
+        else:
+            params.append("--" + key + "=" + val)
+    return params
+
+
 def run_test_suite(test_cmd, suite_config, verbose):
     """Parse test cases for the test suite and run each test."""
     print("\nRunning Test Suite: " + suite_config['suite'])
-    default_params = []
     graph_path = os.path.join(suite_config['output_path'], GRAPH_DIR,
                               suite_config['suite'], "")
     grapher = Grapher(suite_config['config_name'], suite_config['suite'],
@@ -204,18 +217,10 @@ def run_test_suite(test_cmd, suite_config, verbose):
     if 'default' not in test_cases:
         print("Test Suite must contain default case, skipping")
         return
-    for (key, val) in test_cases['default']['eal'].items():
-        if len(key) == 1:
-            default_params.append("-" + key + " " + val)
-        else:
-            default_params.append("--" + key + "=" + val)
 
+    default_params = parse_parameters(test_cases['default']['eal'].items())
     default_params.append("--")
-    for (key, val) in test_cases['default']['app'].items():
-        if isinstance(val, bool):
-            default_params.append("--" + key if val is True else "")
-        else:
-            default_params.append("--" + key + "=" + val)
+    default_params += parse_parameters(test_cases['default']['app'].items())
 
     if 'ptest' not in test_cases['default']['app']:
         print("Test Suite must contain default ptest value, skipping")
@@ -224,13 +229,7 @@ def run_test_suite(test_cmd, suite_config, verbose):
 
     for (test, params) in {k: v for (k, v) in test_cases.items() if
                            k != "default"}.items():
-        extra_params = []
-        for (key, val) in params.items():
-            if isinstance(val, bool):
-                extra_params.append("--" + key if val is True else "")
-            else:
-                extra_params.append("--" + key + "=" + val)
-
+        extra_params = parse_parameters(params.items())
         run_test(test_cmd, test, grapher, default_params + extra_params,
                  verbose)
 
Signature · 1 line
2.25.1
Acked-by on v2 3/3
#9 lore raw

Re: [dpdk-dev] [PATCH v2 3/3] test/cryptodev: fix handling for config parameters

Quoted 18 lines

-----Original Message-----
From: Power, Ciara <[email protected]>
Sent: Tuesday, 2 February, 2021 17:58
To: [email protected]
Cc: [email protected]; Doherty, Declan <[email protected]>; Dybkowski, AdamX <[email protected]>; Power, Ciara <[email protected]>
Subject: [PATCH v2 3/3] test/cryptodev: fix handling for config parameters

The crypto perf graphing script did not handle parsing parameters from the JSON config files correctly.
A common parsing function is used for both EAL and app parameters, to ensure they are handled the same way and to reduce code duplication. Short parameters are now passed with the value being a second argument, rather than as one argument with dividing space.
Long parameters with no expected value are supported for EAL now also. e.g. "--no-huge" can be added to config as "no-huge": true

Quoted 3 lines
Fixes f400e0b82bf1 ("app/crypto-perf: add script to graph perf results")
Applied
#10 lore raw

Re: [dpdk-dev] [PATCH v2 0/3] Update crypto perf script and doc

In reply to Ciara Power
Quoted 4 lines

Subject: [PATCH v2 0/3] Update crypto perf script and doc

This patchset contains some fixes for the crypto perf graphing script.

Quoted 8 lines

A release note is added, and some small fixes for the script documentation are also included.
The script config handling is modified to handle EAL and app parameters using the same method, which fixes a bug that some formats of EAL parameters weren't parsed correctly.

v2: Added patch for parameter handling fix.

Release notes should be part of the actual patch of the feature introduced. Added reference to original patch.

Please ensure to do that in future.
Also use "app/crypto-perf: ...." as title for patches in test-crypto-perf application

Applied to dpdk-next-crypto

Thanks.