add crypto perf test graphing script
cover add crypto perf test graphing script
This patchset introduces a python script to run various crypto performance test cases, and graph the results in a consumable manner. The test suites can be configured via a JSON file, currently throughput and latency ptests for devices crypto_qat, crypto_aesni_mb and crypto_aesni_gcm are supported. The final collection of graphs are output in PDF format, with a PDF per test suite, containing all test case graphs relevant for that suite.
Some cleanup is included for the throughput performance test and latency performance test csv outputs, to make them easier to work with.
Ciara Power (4):
test/cryptodev: fix latency test csv output test/cryptodev: improve csv output for perf tests
usertools: add script to graph crypto perf results
maintainers: update crypto perf app maintainers
MAINTAINERS | 3 + app/test-crypto-perf/cperf_test_latency.c | 13 +- app/test-crypto-perf/cperf_test_throughput.c | 12 +- doc/guides/tools/cryptoperf.rst | 93 ++++++ usertools/dpdk_graph_crypto_perf.py | 249 +++++++++++++++ usertools/graph_crypto_perf_config.json | 309 +++++++++++++++++++ 6 files changed, 665 insertions(+), 14 deletions(-) create mode 100755 usertools/dpdk_graph_crypto_perf.py create mode 100644 usertools/graph_crypto_perf_config.json
Signature · 1 line
2.25.1
PATCH 1/4 test/cryptodev: fix latency test csv output
The csv output for the latency performance test had an extra header, "Packet Size", which is a duplicate of "Buffer Size", and had no corresponding value in the output. This is now removed.
--- app/test-crypto-perf/cperf_test_latency.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
app/test-crypto-perf/cperf_test_latency.c +1 -1
@@ -310,7 +310,7 @@ cperf_latency_test_runner(void *arg)if (ctx->options->csv) {if (rte_atomic16_test_and_set (&display_once))printf ("\n# lcore, Buffer Size, Burst Size, Pakt Seq #, " -"Packet Size, cycles, time (us)" ); +"cycles, time (us)" );for (i =0 ; i < ctx->options->total_ops; i++) {
Signature · 1 line
2.25.1
PATCH 2/4 test/cryptodev: improve csv output for perf tests
In reply to Ciara PowerThe csv outputs for performance tests were not easily consumed, due to unnecessary whitespaces and capitals. The delimiter is modified to now be "," instead of ";" which was present in some cases. Some unnecessary values were also removed from the output.
--- app/test-crypto-perf/cperf_test_latency.c | 13 +++++-------- app/test-crypto-perf/cperf_test_throughput.c | 12 ++++++------ 2 files changed, 11 insertions(+), 14 deletions(-)
app/test-crypto-perf/cperf_test_latency.c +5 -8
@@ -309,18 +309,15 @@ cperf_latency_test_runner(void *arg)if (ctx->options->csv) {if (rte_atomic16_test_and_set (&display_once)) -printf ("\n# lcore, Buffer Size, Burst Size, Pakt Seq #, " -"cycles, time (us)" ); +printf ("\n#buffer_size(b),burst_size,time(us)" );for (i =0 ; i < ctx->options->total_ops; i++) { -printf ("\n%u;%u;%u;%" PRIu64";%" PRIu64";%.3f" , - ctx->lcore_id, ctx->options->test_buffer_size, - test_burst_size, i +1 , - ctx->res[i].tsc_end - ctx->res[i].tsc_start, +printf ("\n%u,%u,%.3f" , + ctx->options->test_buffer_size, + test_burst_size, tunit * (double ) (ctx->res[i].tsc_end - - ctx->res[i].tsc_start) - / tsc_hz); + - ctx->res[i].tsc_start) / tsc_hz); } }else {
app/test-crypto-perf/cperf_test_throughput.c +6 -6
@@ -294,13 +294,13 @@ cperf_throughput_test_runner(void *test_ctx) cycles_per_packet); }else {if (rte_atomic16_test_and_set (&display_once)) -printf ("#lcore id,Buffer Size(B)," -"Burst Size,Enqueued,Dequeued,Failed Enq," -"Failed Deq,Ops(Millions),Throughput(Gbps)," -"Cycles/Buf\n\n" ); +printf ("#lcore_id,buffer_size(b)," +"burst_size,enqueued,dequeued,failed_enq," +"failed_deq,ops(millions),throughput(gbps)," +"cycles_per_buf\n\n" ); - printf("%u;%u;%u;%"PRIu64";%"PRIu64";%"PRIu64";%"PRIu64";" - "%.3f;%.3f;%.3f\n", + printf("%u,%u,%u,%"PRIu64",%"PRIu64",%"PRIu64",%"PRIu64"," + "%.3f,%.3f,%.3f\n", ctx->lcore_id, ctx->options->test_buffer_size, test_burst_size,
Signature · 1 line
2.25.1
Re: [dpdk-dev] [PATCH 2/4] test/cryptodev: improve csv output for perf tests
Quoted 54 lines · Ciara Power
The csv outputs for performance tests were not easily consumed, due to unnecessary whitespaces and capitals. The delimiter is modified to now be "," instead of ";" which was present in some cases. Some unnecessary values were also removed from the output.
Signed-off-by Ciara Power <[email protected]>--- app/test-crypto-perf/cperf_test_latency.c | 13 +++++-------- app/test-crypto-perf/cperf_test_throughput.c | 12 ++++++------ 2 files changed, 11 insertions(+), 14 deletions(-)app/test-crypto-perf/cperf_test_latency.c +5
-8@@ -309,18 +309,15 @@ cperf_latency_test_runner(void *arg)if (ctx->options->csv) {if (rte_atomic16_test_and_set (&display_once)) -printf ("\n# lcore, Buffer Size, Burst Size, Pakt Seq #, " -"cycles, time (us)" ); +printf ("\n#buffer_size(b),burst_size,time(us)" );for (i =0 ; i < ctx->options->total_ops; i++) { -printf ("\n%u;%u;%u;%" PRIu64";%" PRIu64";%.3f" , - ctx->lcore_id, ctx->options->test_buffer_size, - test_burst_size, i +1 , - ctx->res[i].tsc_end - ctx->res[i].tsc_start, +printf ("\n%u,%u,%.3f" , + ctx->options->test_buffer_size, + test_burst_size, tunit * (double ) (ctx->res[i].tsc_end - - ctx->res[i].tsc_start) - / tsc_hz); + - ctx->res[i].tsc_start) / tsc_hz); } }else {app/test-crypto-perf/cperf_test_throughput.c +2
-4@@ -294,13 +294,13 @@ cperf_throughput_test_runner(void *test_ctx) cycles_per_packet); }else {if (rte_atomic16_test_and_set (&display_once)) -printf ("#lcore id,Buffer Size(B)," -"Burst Size,Enqueued,Dequeued,Failed Enq," -"Failed Deq,Ops(Millions),Throughput(Gbps)," -"Cycles/Buf\n\n" ); +printf ("#lcore_id,buffer_size(b)," + "burst_size,enqueued,dequeued,failed_enq,"
app/test-crypto-perf/cperf_test_throughput.c cperf_throughput_test_runner(void *test_ctx) · line 306
Quoted 10 lines
app/test-crypto-perf/cperf_test_throughput.c +4
-2+"failed_deq,ops(millions),throughput(gbps)," + "cycles_per_buf\n\n"); - printf("%u;%u;%u;%"PRIu64";%"PRIu64";%"PRIu64";%"PRIu64";" - "%.3f;%.3f;%.3f\n", + printf("%u,%u,%u,%"PRIu64",%"PRIu64",%"PRIu64",%"PRIu64"," + "%.3f,%.3f,%.3f\n", ctx->lcore_id, ctx->options->test_buffer_size, test_burst_size,
I would suggest limiting the changes here to just fixing the delimiter here to being comma's instead of semi-colon's, that way it should be possible to make the python script support only versions of the output which wouldn't be possible if we change column names.
PATCH 3/4 usertools: add script to graph crypto perf results
In reply to Ciara PowerThe python script introduced in this patch runs the crypto performance test application for various test cases, and graphs the results.
Test cases are defined in the config JSON file, this is where parameters are specified for each test. Currently there are various test cases for devices crypto_qat, crypto_aesni_mb and crypto_gcm. Tests for the ptest types Throughput and Latency are supported for each.
The results of each test case are graphed and saved in PDFs (one PDF for each test suite, showing all test case graphs for that suite). The graphs output include various grouped barcharts for throughput tests, and histogram and boxplot graphs are used for latency tests.
Usage:
The script uses the installed app by default (from ninja install). Alternatively we can pass path to app by
"-f <rel_path>/<build_dir>/app/dpdk-test-crypto-perf"
All device test suites are run by default.
Alternatively we can specify by adding arguments,
"-t all" - to run all test suites
"-t crypto_qat_latency" - to run QAT latency test suite only "-t crypto_aesni_mb_throughput crypto_aesni_gcm_latency"
- to run both AESNI_MB throughput and AESNI_GCM latency test suites
--- MAINTAINERS | 2 + doc/guides/tools/cryptoperf.rst | 93 +++++++ usertools/dpdk_graph_crypto_perf.py | 249 +++++++++++++++++++ usertools/graph_crypto_perf_config.json | 309 ++++++++++++++++++++++++ 4 files changed, 653 insertions(+) create mode 100755 usertools/dpdk_graph_crypto_perf.py create mode 100644 usertools/graph_crypto_perf_config.json
MAINTAINERS +2 -0
@@ -1588,6 +1588,8 @@ M: Declan Doherty <[email protected]> T: git://dpdk.org/next/dpdk-next-crypto F: app/test-crypto-perf/ F: doc/guides/tools/cryptoperf.rst +F: usertools/dpdk_graph_crypto_perf.py +F: usertools/graph_crypto_perf_config.json Eventdev test application M: Jerin Jacob <[email protected]>
doc/guides/tools/cryptoperf.rst +93 -0
96 lines not on this page · raw message
usertools/dpdk_graph_crypto_perf.py new file +249 -0
249 lines not on this page · raw message
usertools/graph_crypto_perf_config.json new file +309 -0
310 lines not on this page · raw message
Signature · 1 line
2.25.1
Re: [dpdk-dev] [PATCH 3/4] usertools: add script to graph crypto perf results
Review
Quoted 4 lines · On Fri, 11 Dec 2020 17:31:13 +0000 Ciara Power <[email protected]> wrote:
(quoted diff) +2
-0+ } +}
Fix your editor please
Re: [dpdk-dev] [PATCH 3/4] usertools: add script to graph crypto perf results
In reply to Ciara PowerQuoted 59 lines · Ciara Power
The python script introduced in this patch runs the crypto performance test application for various test cases, and graphs the results.
Test cases are defined in the config JSON file, this is where parameters are specified for each test. Currently there are various test cases for devices
crypto_qat,crypto_aesni_mbandcrypto_gcm. Tests for the ptest types Throughput and Latency are supported for each.The results of each test case are graphed and saved in PDFs (one PDF for each test suite, showing all test case graphs for that suite). The graphs output include various grouped barcharts for throughput tests, and histogram and boxplot graphs are used for latency tests.
Usage:
The script uses the installed app by default (from ninja install). Alternatively we can pass path to app by"-f <rel_path>/<build_dir>/app/dpdk-test-crypto-perf"All device test suites are run by default.
Alternatively we can specify by adding arguments,
"-t all" - to run all test suites
"-tcrypto_qat_latency" - to run QAT latency test suite only "-tcrypto_aesni_mb_throughputcrypto_aesni_gcm_latency"
- to run bothAESNI_MBthroughput andAESNI_GCMlatency test suitesSigned-off-by Ciara Power <[email protected]>--- MAINTAINERS | 2 + doc/guides/tools/cryptoperf.rst | 93 +++++++ usertools/dpdk_graph_crypto_perf.py | 249 +++++++++++++++++++ usertools/graph_crypto_perf_config.json | 309 ++++++++++++++++++++++++ 4 files changed, 653 insertions(+)create mode 100755
usertools/dpdk_graph_crypto_perf.pycreate mode 100644usertools/graph_crypto_perf_config.jsonMAINTAINERS +2
-0@@ -1588,6 +1588,8 @@ M: Declan Doherty <[email protected]> T: git://dpdk.org/next/dpdk-next-crypto F: app/test-crypto-perf/ F: doc/guides/tools/cryptoperf.rst +F: usertools/dpdk_graph_crypto_perf.py +F: usertools/graph_crypto_perf_config.json Eventdev test application M: Jerin Jacob <[email protected]>doc/guides/tools/cryptoperf.rst +2
-0@@ -453,3 +453,96 @@ Test vector file for cipher algorithm aes cbc 256 with authorization sha:: digest = 0x1C, 0xB2, 0x3D, 0xD1, 0xF9, 0xC7, 0x6C, 0x49, 0x2E, 0xDA, 0x94, 0x8B, 0xF1, 0xCF, 0x96, 0x43, 0x67, 0x50, 0x39, 0x76, 0xB5, 0xA1, 0xCE, 0xA1, 0xD7, 0x77, 0x10, 0x07, 0x43, 0x37, 0x05, 0xB4 + +
doc/guides/tools/cryptoperf.rst Test vector file for cipher algorithm aes cbc 256 with authorization sha:: · line 467
Quoted 10 lines
doc/guides/tools/cryptoperf.rst +10
-0+Graph Crypto Perf Results +------------------------- + +The ``dpdk_graph_crypto_perf.py`` usertool is a simple script to automate +running crypto performance tests, and graphing the results. +The output graphs include various grouped barcharts for throughput +tests, and histogram and boxplot graphs for latency tests. +These are output to PDF files, with one PDF per test suite. + +
Add section regarding required python modules needed.
Quoted 30 lines
doc/guides/tools/cryptoperf.rst +30
-0+Test Configuration +~~~~~~~~~~~~~~~~~~ + +The test cases run by the script are outlined in the ``graph_crypto_perf_config.json`` file. +An example of this configuration is shown below for one test suite, +showing the default config for the test suite, and one test case. +The test case has additional app config that will be combined with +the default config when running the test case. + +.. code-block:: c + + "crypto_aesni_mb_throughput": { + "default": { + "eal": { + "l": "1,2", + "log-level": "1", + "vdev": "crypto_aesni_mb" + }, + "app": { + "csv-friendly": true, + "silent": true, + "buffer-sz": "64,128,256,512,768,1024,1408,2048", + "burst-sz": "1,4,8,16,32", + "ptest": "throughput", + "devtype": "crypto_aesni_mb" + } + }, + "AES-CBC-128 SHA1-HMAC auth-then-cipher decrypt": { + "cipher-algo": "aes-cbc", + "cipher-key-sz": "16",
doc/guides/tools/cryptoperf.rst Test vector file for cipher algorithm aes cbc 256 with authorization sha:: · line 507
Quoted 10 lines
doc/guides/tools/cryptoperf.rst +10
-0+ "auth-algo": "sha1-hmac", + "optype": "auth-then-cipher", + "cipher-op": "decrypt" + } + } + +Currently, crypto_qat, crypto_aesni_mb, and crypto_aesni_gcm devices for +both throughput and latency ptests are supported. + +
Should note that specific test cases only allow for modification of the application parameters and not the EAL parameters, and that a default configuration is required to specify EAL parameters.
Quoted 251 lines
doc/guides/tools/cryptoperf.rst +41
-0+Usage +~~~~~ + +.. code-block:: console + + ./dpdk_graph_crypto_perf + +The following are the application command-line options: + +* ``-f file_path`` + + Provide path to ``dpdk-test-crypto-perf`` application. + The script uses the installed app by default. + + .. code-block:: console + + ./dpdk_graph_crypto_perf -f <build_dir>/app/dpdk-test-crypto-perf + + +* ``-t test_suite_list`` + + Specify test suites to run. All test suites are run by default. + + To run all test suites + + .. code-block:: console + + ./dpdk_graph_crypto_perf -t all + + To run crypto_qat latency test suite only + + .. code-block:: console + + ./dpdk_graph_crypto_perf -t crypto_qat_latency + + To run both crypto_aesni_mb throughput and crypto_aesni_gcm latency test suites + + .. code-block:: console + + ./dpdk_graph_crypto_perf -t crypto_aesni_mb_throughput \ + crypto_aesni_gcm_latencyusertools/dpdk_graph_crypto_perf.py new file +204
-0@@ -0,0 +1,249 @@ +#! /usr/bin/env python3 +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2020 Intel Corporation + +""" +Script to automate running crypto performance tests for a range of test +cases and devices as configured in the JSON file. +The results are processed and output into various graphs in PDF files. +Currently, throughput and latency tests are supported. +""" + +import glob +import json +import os +import shutil +import subprocess +from argparse import ArgumentParser +from datetime import datetime +import img2pdf +import pandas as pd +import plotly.express as px + +SCRIPT_PATH = os.path.dirname(__file__) + "/" +GRAPHS_PATH = SCRIPT_PATH + "graph_crypto_perf_graphs/" +PDFS_PATH = SCRIPT_PATH + "graph_crypto_perf_pdfs/" + + +class Grapher: + """Grapher object containing all graphing functions. """ + def __init__(self, dev): + self.graph_num = 0 + self.dev = dev + self.test = "" + self.ptest = "" + self.data = pd.DataFrame() + if not os.path.exists(GRAPHS_PATH): + os.makedirs(GRAPHS_PATH) + + def save_graph(self, fig): + """ + Update figure layout to increase readability, output to JPG file. + """ + fig.update_layout(font_size=30, title_x=0.5, title_font={"size": 30}, + margin=dict(t=200, l=150, r=150, b=150)) + fig.write_image(GRAPHS_PATH + "%s_%d.jpg" % (self.dev, + self.graph_num)) + + def boxplot_graph(self, x_axis_label): + """Plot a boxplot graph for the given parameters.""" + fig = px.box(self.data, x=x_axis_label, + title="Device: " + self.dev + "<br>" + self.test + + "<br>(Outliers Included)", height=1200, width=2400) + self.save_graph(fig) + self.graph_num += 1 + + def grouped_graph(self, y_axis_label, x_axis_label, color_label): + """Plot a grouped barchart using the given parameters.""" + if (self.data[y_axis_label] == 0).all(): + return + fig = px.bar(self.data, x=x_axis_label, color=color_label, + y=y_axis_label, + title="Device: " + self.dev + "<br>" + self.test + "<br>" + + y_axis_label + " for each " + x_axis_label + + "/" + color_label, + barmode="group", + height=1200, + width=2400) + fig.update_xaxes(type='category') + self.save_graph(fig) + self.graph_num += 1 + + def histogram_graph(self, x_axis_label): + """Plot a histogram graph using the given parameters.""" + quart1 = self.data[x_axis_label].quantile(0.25) + quart3 = self.data[x_axis_label].quantile(0.75) + inter_quart_range = quart3 - quart1 + dev_data_out = self.data[~((self.data[x_axis_label] < + (quart1 - 1.5 * inter_quart_range)) | + (self.data[x_axis_label] > + (quart3 + 1.5 * inter_quart_range)))] + fig = px.histogram(dev_data_out, x=x_axis_label, + title="Device: " + self.dev + "<br>" + self.test + + "<br>(Outliers removed using Interquartile Range)", + height=1200, + width=2400) + max_val = dev_data_out[x_axis_label].max() + min_val = dev_data_out[x_axis_label].min() + fig.update_traces(xbins=dict( + start=min_val, + end=max_val, + size=(max_val - min_val) / 200 + )) + self.save_graph(fig) + self.graph_num += 1 + + +def cleanup_throughput_datatypes(data): + """Cleanup data types of throughput test results dataframe. """ + data['burst_size'] = data['burst_size'].astype('int') + data['buffer_size(b)'] = data['buffer_size(b)'].astype('int') + data['burst_size'] = data['burst_size'].astype('category') + data['buffer_size(b)'] = data['buffer_size(b)'].astype('category') + data['failed_enq'] = data['failed_enq'].astype('int') + data['throughput(gbps)'] = data['throughput(gbps)'].astype('float') + data['ops(millions)'] = data['ops(millions)'].astype('float') + data['cycles_per_buf'] = data['cycles_per_buf'].astype('float') + return data + + +def process_test_results(grapher, data): + """ + Process results from the test case, + calling graph functions to output graph images. + """ + print("\tProcessing Test Case Results: " + grapher.test) + if grapher.ptest == "throughput": + grapher.data = cleanup_throughput_datatypes(data) + for y_label in ["throughput(gbps)", "ops(millions)", + "cycles_per_buf", "failed_enq"]: + grapher.grouped_graph(y_label, "buffer_size(b)", + "burst_size") + elif grapher.ptest == "latency": + data['time(us)'] = data['time(us)'].astype('float') + grapher.data = data + grapher.histogram_graph("time(us)") + grapher.boxplot_graph("time(us)") + else: + print("Invalid ptest") + return + + +def create_results_pdf(dev): + """Output results graphs to one PDF.""" + if not os.path.exists(PDFS_PATH): + os.makedirs(PDFS_PATH) + dev_graphs = sorted(glob.glob(GRAPHS_PATH + "%s_*.jpg" % dev), key=( + lambda x: int((x.rsplit('_', 1)[1]).split('.')[0]))) + if dev_graphs: + with open(PDFS_PATH + "/%s_results.pdf" % dev, "wb") as pdf_file: + pdf_file.write(img2pdf.convert(dev_graphs)) + + +def run_test(test_cmd, test, grapher, timestamp, params): + """Run performance test app for the given test case parameters.""" + print("\n\tRunning Test Case: " + test) + try: + process_out = subprocess.check_output([test_cmd] + params, + universal_newlines=True, + stderr=subprocess.STDOUT) + rows = [] + for line in process_out.split('\n'): + if not line: + continue + if line.startswith('#'): + columns = line[1:].split(',') + elif line[0].isdigit(): + rows.append(line.split(',')) + else: + continue + data = pd.DataFrame(rows, columns=columns) + data['date'] = timestamp + grapher.test = test + process_test_results(grapher, data) + except subprocess.CalledProcessError as err: + print("\tCannot run performance test application for: " + str(err)) + return + + +def run_test_suite(test_cmd, dut, test_cases, timestamp): + """Parse test cases for the test suite and run each test.""" + print("\nRunning Test Suite: " + dut) + default_params = [] + grapher = Grapher(dut) + 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.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) + + if 'ptest' not in test_cases['default']['app']: + print("Test Suite must contain default ptest value, skipping") + return + grapher.ptest = test_cases['default']['app']['ptest'] + + 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(): + extra_params.append("--" + key + "=" + val) + run_test(test_cmd, test, grapher, timestamp, + default_params + extra_params) + + create_results_pdf(dut) + + +def parse_args(): + """Parse command-line arguments passed to script."""
usertools/dpdk_graph_crypto_perf.py line 214
Quoted 10 lines
usertools/dpdk_graph_crypto_perf.py new file +10
-0+ parser = ArgumentParser() + parser.add_argument('-f', '--file-path', + default=shutil.which('dpdk-test-crypto-perf'), + help="Path for test perf app") + parser.add_argument('-t', '--test-suites', nargs='+', default=["all"], + help="List of device test suites to run") + args = parser.parse_args() + return args.file_path, args.test_suites + +
I think you should allow the user to specify paths for the configuration files and the output location.
May also consider adding support for specifying a specific test case within a suite.
Quoted 25 lines
usertools/dpdk_graph_crypto_perf.py new file +25
-0+def main(): + """ + Load JSON config and call relevant functions to run chosen test suites. + """ + test_cmd, test_suites = parse_args() + if not os.path.isfile(test_cmd): + print("Invalid filepath!") + return + try: + with open(SCRIPT_PATH + 'graph_crypto_perf_config.json') as conf: + test_suite_options = json.load(conf) + except json.decoder.JSONDecodeError as err: + print("Error loading JSON config: " + err.msg) + return + timestamp = pd.Timestamp(datetime.now()) + + if test_suites != ["all"]: + dev_list = [] + for (dut, test_cases) in {k: v for (k, v) in test_suite_options.items() + if k in test_suites}.items(): + dev_list.append(dut) + run_test_suite(test_cmd, dut, test_cases, timestamp) + if not dev_list: + print("No valid device test suites chosen!") + return
usertools/dpdk_graph_crypto_perf.py
Quoted 10 lines
usertools/dpdk_graph_crypto_perf.py new file +10
-0+ else: + for (dut, test_cases) in test_suite_options.items(): + run_test_suite(test_cmd, dut, test_cases, timestamp) + + if os.path.exists(GRAPHS_PATH): + shutil.rmtree(GRAPHS_PATH) + + +if __name__ == "__main__": + main() > diff --git a/usertools/graph_crypto_perf_config.json
b/usertools/graph_crypto_perf_config.json
Quoted 306 lines
new file mode 100644
index 0000000000..004ec3e84eusertools/graph_crypto_perf_config.json new file +300
-0@@ -0,0 +1,309 @@ +{ + "crypto_aesni_mb_throughput": { + "default": { + "eal": { + "l": "1,2", + "log-level": "1", + "vdev": "crypto_aesni_mb" + }, + "app": { + "csv-friendly": true, + "silent": true, + "buffer-sz": "64,128,256,512,768,1024,1408,2048", + "burst-sz": "1,4,8,16,32", + "ptest": "throughput", + "devtype": "crypto_aesni_mb" + } + }, + "AES-CBC-128 SHA1-HMAC auth-then-cipher decrypt": { + "cipher-algo": "aes-cbc", + "cipher-key-sz": "16", + "auth-algo": "sha1-hmac", + "optype": "auth-then-cipher", + "cipher-op": "decrypt" + }, + "AES-CBC-128 SHA1-HMAC cipher-then-auth encrypt": { + "cipher-algo": "aes-cbc", + "cipher-key-sz": "16", + "auth-algo": "sha1-hmac", + "auth-op": "generate", + "auth-key-sz": "64", + "digest-sz": "20", + "optype": "cipher-then-auth", + "cipher-op": "encrypt" + }, + "AES-CBC-256 SHA2-256-HMAC auth-then-cipher decrypt": { + "cipher-algo": "aes-cbc", + "cipher-key-sz": "32", + "auth-algo": "sha2-256-hmac", + "optype": "auth-then-cipher", + "cipher-op": "decrypt" + }, + "AES-CBC-256 SHA2-256-HMAC cipher-then-auth encrypt": { + "cipher-algo": "aes-cbc", + "cipher-key-sz": "32", + "auth-algo": "sha2-256-hmac", + "optype": "cipher-then-auth" + }, + "AES-GCM-128 aead-op encrypt": { + "aead-algo": "aes-gcm", + "aead-key-sz": "16", + "aead-iv-sz": "12", + "aead-op": "encrypt", + "aead-aad-sz": "16", + "digest-sz": "16", + "optype": "aead", + "total-ops": "10000000" + }, + "AES-GCM-128 aead-op decrypt": { + "aead-algo": "aes-gcm", + "aead-key-sz": "16", + "aead-op": "decrypt" + }, + "AES-GCM-256 aead-op encrypt": { + "aead-algo": "aes-gcm", + "aead-key-sz": "32", + "aead-op": "encrypt" + }, + "AES-GCM-256 aead-op decrypt": { + "aead-algo": "aes-gcm", + "aead-key-sz": "32", + "aead-op": "decrypt" + }, + "AES-GMAC 128 auth-only generate": { + "auth-algo": "aes-gmac", + "auth-key-sz": "16", + "auth-iv-sz": "12", + "auth-op": "generate", + "digest-sz": "16", + "optype": "auth-only", + "total-ops": "10000000" + } + }, + "crypto_aesni_mb_latency": { + "default": { + "eal": { + "l": "1,2", + "log-level": "1", + "vdev": "crypto_aesni_mb" + }, + "app": { + "csv-friendly": true, + "silent": true, + "buffer-sz": "1024", + "burst-sz": "16", + "ptest": "latency", + "devtype": "crypto_aesni_mb" + } + }, + "AES-CBC-128 SHA1-HMAC auth-then-cipher decrypt": { + "cipher-algo": "aes-cbc", + "cipher-key-sz": "16", + "auth-algo": "sha1-hmac", + "optype": "auth-then-cipher", + "cipher-op": "decrypt" + }, + "AES-GCM-256 aead-op encrypt": { + "aead-algo": "aes-gcm", + "aead-key-sz": "32", + "aead-op": "encrypt" + } + }, + "crypto_aesni_gcm_throughput": { + "default": { + "eal": { + "l": "1,2", + "log-level": "1", + "vdev": "crypto_aesni_gcm" + }, + "app": { + "csv-friendly": true, + "silent": true, + "buffer-sz": "64,128,256,512,768,1024,1408,2048", + "burst-sz": "1,4,8,16,32", + "ptest": "throughput", + "devtype": "crypto_aesni_gcm" + } + }, + "AES-GCM-128 aead-op encrypt": { + "aead-algo": "aes-gcm", + "aead-key-sz": "16", + "aead-iv-sz": "12", + "aead-op": "encrypt", + "aead-aad-sz": "16", + "digest-sz": "16", + "optype": "aead", + "total-ops": "10000000" + }, + "AES-GCM-128 aead-op decrypt": { + "aead-algo": "aes-gcm", + "aead-key-sz": "16", + "aead-op": "decrypt", + "aead-aad-sz": "16", + "aead-iv-sz": "12", + "digest-sz": "16", + "optype": "aead", + "total-ops": "10000000" + }, + "AES-GCM-256 aead-op encrypt": { + "aead-algo": "aes-gcm", + "aead-key-sz": "32", + "aead-op": "encrypt", + "aead-aad-sz": "32", + "aead-iv-sz": "12", + "digest-sz": "16", + "optype": "aead", + "total-ops": "10000000" + }, + "AES-GCM-256 aead-op decrypt": { + "aead-algo": "aes-gcm", + "aead-key-sz": "32", + "aead-op": "decrypt", + "aead-aad-sz": "32", + "aead-iv-sz": "12", + "digest-sz": "16", + "optype": "aead", + "total-ops": "10000000" + }, + "AES-GMAC 128 auth-only generate": { + "auth-algo": "aes-gmac", + "auth-key-sz": "16", + "auth-iv-sz": "12", + "auth-op": "generate", + "digest-sz": "16", + "optype": "auth-only", + "total-ops": "10000000" + } + }, + "crypto_aesni_gcm_latency": { + "default": { + "eal": { + "l": "1,2", + "log-level": "1", + "vdev": "crypto_aesni_gcm" + }, + "app": { + "csv-friendly": true, + "silent": true, + "buffer-sz": "1024", + "burst-sz": "16", + "ptest": "latency", + "devtype": "crypto_aesni_gcm" + } + }, + "AES-GCM-128 aead-op decrypt": { + "aead-algo": "aes-gcm", + "aead-key-sz": "16", + "aead-op": "decrypt", + "aead-aad-sz": "16", + "aead-iv-sz": "12", + "digest-sz": "16", + "optype": "aead" + }, + "AES-GCM-256 aead-op encrypt latency": { + "aead-algo": "aes-gcm", + "aead-key-sz": "32", + "aead-op": "encrypt", + "aead-aad-sz": "32", + "aead-iv-sz": "12", + "digest-sz": "16", + "optype": "aead" + } + }, + "crypto_qat_throughput": { + "default": { + "eal": { + "l": "1,2", + "log-level": "1" + }, + "app": { + "csv-friendly": true, + "silent": true, + "buffer-sz": "64,128,256,512,768,1024,1408,2048", + "burst-sz": "1,4,8,16,32", + "devtype": "crypto_qat", + "ptest": "throughput" + } + }, + "AES-CBC-128 SHA1-HMAC auth-then-cipher decrypt": { + "cipher-algo": "aes-cbc", + "cipher-key-sz": "16", + "auth-algo": "sha1-hmac", + "optype": "auth-then-cipher", + "cipher-op": "decrypt" + }, + "AES-CBC-128 SHA1-HMAC cipher-then-auth encrypt": { + "cipher-algo": "aes-cbc", + "cipher-key-sz": "16", + "auth-algo": "sha1-hmac", + "optype": "cipher-then-auth", + "cipher-op": "encrypt" + }, + "AES-CBC-256 SHA2-256-HMAC auth-then-cipher decrypt": { + "cipher-algo": "aes-cbc", + "cipher-key-sz": "32", + "auth-algo": "sha2-256-hmac", + "optype": "auth-then-cipher", + "cipher-op": "decrypt" + }, + "AES-CBC-256 SHA2-256-HMAC cipher-then-auth encrypt": { + "cipher-algo": "aes-cbc", + "cipher-key-sz": "32", + "auth-algo": "sha2-256-hmac", + "optype": "cipher-then-auth", + "cipher-op": "encrypt" + }, + "AES-GCM-128 aead-op encrypt": { + "aead-algo": "aes-gcm", + "aead-key-sz": "16", + "aead-iv-sz": "12", + "aead-op": "encrypt", + "aead-aad-sz": "16", + "digest-sz": "16", + "optype": "aead" + }, + "AES-GCM-128 aead-op decrypt": { + "aead-algo": "aes-gcm", + "aead-key-sz": "16", + "aead-op": "decrypt" + }, + "AES-GCM-256 aead-op encrypt": { + "aead-algo": "aes-gcm", + "aead-key-sz": "32", + "aead-op": "encrypt" + }, + "AES-GCM-256 aead-op decrypt": { + "aead-algo": "aes-gcm", + "aead-key-sz": "32", + "aead-op": "decrypt" + } + }, + "crypto_qat_latency": { + "default": { + "eal": { + "l": "1,2", + "log-level": "1" + }, + "app": { + "csv-friendly": true, + "silent": true, + "ptest": "latency", + "buffer-sz": "1024", + "burst-sz": "16", + "devtype": "crypto_qat" + } + }, + "AES-CBC-256 SHA2-256-HMAC cipher-then-auth encrypt": { + "cipher-algo": "aes-cbc", + "cipher-key-sz": "32", + "auth-algo": "sha2-256-hmac", + "optype": "cipher-then-auth",
usertools/graph_crypto_perf_config.json line 309
Quoted 10 lines
usertools/graph_crypto_perf_config.json new file +9
-0+ "cipher-op": "encrypt" + }, + "AES-GCM-128 aead-op encrypt": { + "aead-algo": "aes-gcm", + "aead-key-sz": "16", + "aead-op": "encrypt" + } + } +}
I would suggest splitting the json file into one configuration per device type.
PATCH 4/4 maintainers: update crypto perf app maintainers
In reply to Ciara PowerThis patch adds a maintainer for the crypto perf test application, to cover the new perf test graphing script.
--- MAINTAINERS | 1 + 1 file changed, 1 insertion(+)
MAINTAINERS +1 -0
@@ -1585,6 +1585,7 @@ F: doc/guides/tools/comp_perf.rst Crypto performance test application M: Declan Doherty <[email protected]> +M: Ciara Power <[email protected]> T: git://dpdk.org/next/dpdk-next-crypto F: app/test-crypto-perf/ F: doc/guides/tools/cryptoperf.rst
Signature · 1 line
2.25.1
v2 cover add crypto perf test graphing script
In reply to Ciara PowerThis patchset introduces a python script to run various crypto performance test cases, and graph the results in a consumable manner. The test suites are configured via JSON file. Some config files are provided, or the user may create one. Currently throughput and latency ptests for devices crypto_qat, crypto_aesni_mb and crypto_aesni_gcm are supported.
The final collection of graphs are output in PDF format, with multiple PDFs per test suite, one for each graph type.
Some fixes are included for the throughput performance test and latency performance test csv outputs also.
v2:
- Reduced changes to only fix csv format for all perf test types.
- Added functionality for additional args such as config file, output directory and verbose.
- Improved help text for script.
- Improved script console output.
- Added support for latency test cases with burst or buffer size lists.
- Split config file into smaller config files, one for each device.
- Split output PDFs into smaller files, based on test suite graph types.
- Modified output directory naming and structure.
- Made some general improvements to script.
- Updated and improved documentation.
Ciara Power (4):
test/cryptodev: fix latency test csv output test/cryptodev: fix csv output format
usertools: add script to graph crypto perf results
maintainers: update crypto perf app maintainers
MAINTAINERS | 3 + app/test-crypto-perf/cperf_test_latency.c | 4 +- .../cperf_test_pmd_cyclecount.c | 2 +- app/test-crypto-perf/cperf_test_throughput.c | 4 +- app/test-crypto-perf/cperf_test_verify.c | 2 +- doc/guides/tools/cryptoperf.rst | 142 ++++++++ usertools/configs/crypto-perf-aesni-gcm.json | 99 ++++++ usertools/configs/crypto-perf-aesni-mb.json | 108 ++++++ usertools/configs/crypto-perf-qat.json | 94 ++++++ usertools/dpdk-graph-crypto-perf.py | 309 ++++++++++++++++++ 10 files changed, 761 insertions(+), 6 deletions(-) create mode 100644 usertools/configs/crypto-perf-aesni-gcm.json create mode 100644 usertools/configs/crypto-perf-aesni-mb.json create mode 100644 usertools/configs/crypto-perf-qat.json create mode 100755 usertools/dpdk-graph-crypto-perf.py
Signature · 1 line
2.25.1
PATCH v2 1/4 test/cryptodev: fix latency test csv output
The csv output for the latency performance test had an extra header, "Packet Size", which is a duplicate of "Buffer Size", and had no corresponding value in the output. This is now removed.
--- app/test-crypto-perf/cperf_test_latency.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
app/test-crypto-perf/cperf_test_latency.c +1 -1
@@ -310,7 +310,7 @@ cperf_latency_test_runner(void *arg)if (ctx->options->csv) {if (rte_atomic16_test_and_set (&display_once))printf ("\n# lcore, Buffer Size, Burst Size, Pakt Seq #, " -"Packet Size, cycles, time (us)" ); +"cycles, time (us)" );for (i =0 ; i < ctx->options->total_ops; i++) {
Signature · 1 line
2.25.1
Re: [dpdk-dev] [PATCH v2 1/4] test/cryptodev: fix latency test csv output
Quoted 14 lines
-----Original Message-----
From: Power, Ciara <[email protected]>
Sent: Thursday, 14 January, 2021 11:41
To: [email protected]
Cc: Doherty, Declan <[email protected]>; [email protected]; [email protected]; Dybkowski, AdamX <[email protected]>; Power, Ciara <[email protected]>; De Lara Guarch, Pablo <[email protected]>; [email protected]
Subject: [PATCH v2 1/4] test/cryptodev: fix latency test csv outputThe csv output for the latency performance test had an extra header, "Packet Size", which is a duplicate of "Buffer Size", and had no corresponding value in the output. This is now removed.
Quoted 5 lines
Fixes f6cefe253cc8 ("app/crypto-perf: add range/list of sizes")Signed-off-by Ciara Power <[email protected]>
PATCH v2 2/4 test/cryptodev: fix csv output format
In reply to Ciara PowerThe csv output for each ptest type used ";" instead of ",". This has now been fixed to use the comma format that is used in the csv headers.
---
v2:
- Reduced changes to only fix csv format.
--- app/test-crypto-perf/cperf_test_latency.c | 2 +- app/test-crypto-perf/cperf_test_pmd_cyclecount.c | 2 +- app/test-crypto-perf/cperf_test_throughput.c | 4 ++-- app/test-crypto-perf/cperf_test_verify.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-)
app/test-crypto-perf/cperf_test_latency.c +1 -1
@@ -314,7 +314,7 @@ cperf_latency_test_runner(void *arg)for (i =0 ; i < ctx->options->total_ops; i++) { - printf("\n%u;%u;%u;%"PRIu64";%"PRIu64";%.3f", + printf("\n%u,%u,%u,%"PRIu64",%"PRIu64",%.3f", ctx->lcore_id, ctx->options->test_buffer_size, test_burst_size, i + 1, ctx->res[i].tsc_end - ctx->res[i].tsc_start,
app/test-crypto-perf/cperf_test_pmd_cyclecount.c +1 -1
@@ -16,7 +16,7 @@#define PRETTY_HDR_FMT "%12s%12s%12s%12s%12s%12s%12s%12s%12s%12s\n\n"#define PRETTY_LINE_FMT "%12u%12u%12u%12u%12u%12u%12u%12.0f%12.0f%12.0f\n"#define CSV_HDR_FMT "%s,%s,%s,%s,%s,%s,%s,%s,%s,%s\n" -#define CSV_LINE_FMT "%10u;%10u;%u;%u;%u;%u;%u;%.3f;%.3f;%.3f\n" +#define CSV_LINE_FMT "%10u,%10u,%u,%u,%u,%u,%u,%.3f,%.3f,%.3f\n"struct cperf_pmd_cyclecount_ctx {uint8_t dev_id;
app/test-crypto-perf/cperf_test_throughput.c +2 -2
@@ -299,8 +299,8 @@ cperf_throughput_test_runner(void *test_ctx)"Failed Deq,Ops(Millions),Throughput(Gbps)," "Cycles/Buf\n\n"); - printf("%u;%u;%u;%"PRIu64";%"PRIu64";%"PRIu64";%"PRIu64";" - "%.3f;%.3f;%.3f\n", + printf("%u,%u,%u,%"PRIu64",%"PRIu64",%"PRIu64",%"PRIu64"," + "%.3f,%.3f,%.3f\n", ctx->lcore_id, ctx->options->test_buffer_size, test_burst_size,
app/test-crypto-perf/cperf_test_verify.c +1 -1
@@ -406,7 +406,7 @@ cperf_verify_test_runner(void *test_ctx)"Burst Size,Enqueued,Dequeued,Failed Enq," "Failed Deq,Failed Ops\n"); - printf("%10u;%10u;%u;%"PRIu64";%"PRIu64";%"PRIu64";%"PRIu64";" + printf("%10u,%10u,%u,%"PRIu64",%"PRIu64",%"PRIu64",%"PRIu64"," "%"PRIu64"\n", ctx->lcore_id, ctx->options->max_buffer_size,
Signature · 1 line
2.25.1
Re: [dpdk-dev] [PATCH v2 2/4] test/cryptodev: fix csv output format
Quoted 15 lines
-----Original Message-----
From: Power, Ciara <[email protected]>
Sent: Thursday, 14 January, 2021 11:41
To: [email protected]
Cc: Doherty, Declan <[email protected]>; [email protected]; [email protected]; Dybkowski, AdamX <[email protected]>; Power, Ciara <[email protected]>; Burakov, Anatoly <[email protected]>; De Lara Guarch, Pablo <[email protected]>; [email protected]
Subject: [PATCH v2 2/4] test/cryptodev: fix csv output formatThe csv output for each ptest type used ";" instead of ",". This has now been fixed to use the comma format that is used in the csv headers.
Quoted 8 lines
Fixes f6cefe253cc8 ("app/crypto-perf: add range/list of sizes")Fixes 96dfeb609be1 ("app/crypto-perf: add new PMD benchmarking mode")Fixes da40ebd6d383 ("app/crypto-perf: display results in test runner")Signed-off-by Ciara Power <[email protected]>
PATCH v2 3/4 usertools: add script to graph crypto perf results
In reply to Ciara PowerThe python script introduced in this patch runs the crypto performance test application for various test cases, and graphs the results.
Test cases are defined in config JSON files, this is where parameters are specified for each test. Currently there are various test cases for devices crypto_qat, crypto_aesni_mb and crypto_gcm. Tests for the ptest types Throughput and Latency are supported for each.
The results of each test case are graphed and saved in PDFs (one PDF for each test suite graph type, with all test cases).
The graphs output include various grouped barcharts for throughput tests, and histogram and boxplot graphs are used for latency tests.
Documentation is added to outline the configuration and usage for the script.
Usage:
A JSON config file must be specified when running the script,
"./dpdk-graph-crypto-perf <config_file>"
The script uses the installed app by default (from ninja install). Alternatively we can pass path to app by
"-f <rel_path>/<build_dir>/app/dpdk-test-crypto-perf"
All device test suites are run by default. Alternatively we can specify by adding arguments,
"-t latency" - to run latency test suite only "-t throughput latency"
- to run both throughput and latency test suites
A directory can be specified for all output files, or the script directory is used by default.
"-o <output_dir>"
To see the output from the dpdk-test-crypto-perf app, use the verbose option "-v".
---
v2:
- Added functionality for additional args such as config file, output directory and verbose.
- Improved help text for script.
- Improved script console output.
- Added support for latency test cases with burst or buffer size lists.
- Split config file into smaller config files, one for each device.
- Split output PDFs into smaller files, based on test suite graph types.
- Modified output directory naming and structure.
- Made some general improvements to script.
- Updated and improved documentation.
- Updated copyright year.
--- MAINTAINERS | 2 + doc/guides/tools/cryptoperf.rst | 142 +++++++++ usertools/configs/crypto-perf-aesni-gcm.json | 99 ++++++ usertools/configs/crypto-perf-aesni-mb.json | 108 +++++++ usertools/configs/crypto-perf-qat.json | 94 ++++++ usertools/dpdk-graph-crypto-perf.py | 309 +++++++++++++++++++ 6 files changed, 754 insertions(+) create mode 100644 usertools/configs/crypto-perf-aesni-gcm.json create mode 100644 usertools/configs/crypto-perf-aesni-mb.json create mode 100644 usertools/configs/crypto-perf-qat.json create mode 100755 usertools/dpdk-graph-crypto-perf.py
MAINTAINERS +2 -0
@@ -1589,6 +1589,8 @@ M: Declan Doherty <[email protected]> T: git://dpdk.org/next/dpdk-next-crypto F: app/test-crypto-perf/ F: doc/guides/tools/cryptoperf.rst +F: usertools/dpdk-graph-crypto-perf.py +F: usertools/configs Eventdev test application M: Jerin Jacob <[email protected]>
doc/guides/tools/cryptoperf.rst +142 -0
145 lines not on this page · raw message
usertools/configs/crypto-perf-aesni-gcm.json new file +99 -0
99 lines not on this page · raw message
usertools/configs/crypto-perf-aesni-mb.json new file +108 -0
108 lines not on this page · raw message
usertools/configs/crypto-perf-qat.json new file +94 -0
94 lines not on this page · raw message
usertools/dpdk-graph-crypto-perf.py new file +309 -0
309 lines not on this page · raw message
Signature · 1 line
2.25.1
Re: [dpdk-dev] [PATCH v2 3/4] usertools: add script to graph crypto perf results
Quoted 39 lines
-----Original Message-----
From: Power, Ciara <[email protected]>
Sent: Thursday, 14 January, 2021 11:41
To: [email protected]
Cc: Doherty, Declan <[email protected]>; [email protected]; [email protected]; Dybkowski, AdamX <[email protected]>; Power, Ciara <[email protected]>; Thomas Monjalon <[email protected]>
Subject: [PATCH v2 3/4] usertools: add script to graph crypto perf resultsThe python script introduced in this patch runs the crypto performance test application for various test cases, and graphs the results.
Test cases are defined in config JSON files, this is where parameters are specified for each test. Currently there are various test cases for devices
crypto_qat,crypto_aesni_mbandcrypto_gcm. Tests for the ptest types Throughput and Latency are supported for each.The results of each test case are graphed and saved in PDFs (one PDF for each test suite graph type, with all test cases).
The graphs output include various grouped barcharts for throughput tests, and histogram and boxplot graphs are used for latency tests.Documentation is added to outline the configuration and usage for the script.
Usage:
A JSON config file must be specified when running the script,
"./dpdk-graph-crypto-perf <config_file>"The script uses the installed app by default (from ninja install). Alternatively we can pass path to app by
"-f <rel_path>/<build_dir>/app/dpdk-test-crypto-perf"All device test suites are run by default. Alternatively we can specify by adding arguments,
"-t latency" - to run latency test suite only "-t throughput latency"
- to run both throughput and latency test suites
Quoted 8 lines
A directory can be specified for all output files, or the script directory is used by default.
"-o <output_dir>"To see the output from the dpdk-test-crypto-perf app, use the verbose option "- v".
Signed-off-by Ciara Power <[email protected]>
PATCH v2 4/4 maintainers: update crypto perf app maintainers
In reply to Ciara PowerThis patch adds a maintainer for the crypto perf test application, to cover the new perf test graphing script.
--- MAINTAINERS | 1 + 1 file changed, 1 insertion(+)
MAINTAINERS +1 -0
@@ -1586,6 +1586,7 @@ F: doc/guides/tools/comp_perf.rst Crypto performance test application M: Declan Doherty <[email protected]> +M: Ciara Power <[email protected]> T: git://dpdk.org/next/dpdk-next-crypto F: app/test-crypto-perf/ F: doc/guides/tools/cryptoperf.rst
Signature · 1 line
2.25.1
Re: [dpdk-dev] [PATCH v2 4/4] maintainers: update crypto perf app maintainers
Quoted 10 lines
-----Original Message-----
From: Power, Ciara <[email protected]>
Sent: Thursday, 14 January, 2021 11:41
To: [email protected]
Cc: Doherty, Declan <[email protected]>; [email protected]; [email protected]; Dybkowski, AdamX <[email protected]>; Power, Ciara <[email protected]>; Thomas Monjalon <[email protected]>
Subject: [PATCH v2 4/4] maintainers: update crypto perf app maintainers
Quoted 4 lines
This patch adds a maintainer for the crypto perf test application, to cover the new perf test graphing script.
Signed-off-by Ciara Power <[email protected]>
Quoted 42 lines · Ciara Power
This patchset introduces a python script to run various crypto performance test cases, and graph the results in a consumable manner. The test suites are configured via JSON file. Some config files are provided, or the user may create one. Currently throughput and latency ptests for devices
crypto_qat,crypto_aesni_mbandcrypto_aesni_gcmare supported.The final collection of graphs are output in PDF format, with multiple PDFs per test suite, one for each graph type.
Some fixes are included for the throughput performance test and latency performance test csv outputs also.
v2:
- Reduced changes to only fix csv format for all perf test types.
- Added functionality for additional args such as config file, output directory and verbose.
- Improved help text for script.
- Improved script console output.
- Added support for latency test cases with burst or buffer size lists.
- Split config file into smaller config files, one for each device.
- Split output PDFs into smaller files, based on test suite graph types.
- Modified output directory naming and structure.
- Made some general improvements to script.
- Updated and improved documentation.Ciara Power (4):
test/cryptodev: fix latency test csv output test/cryptodev: fix csv output format
usertools: add script to graph crypto perf results
maintainers: update crypto perf app maintainersMAINTAINERS | 3 + app/test-crypto-perf/cperf_test_latency.c | 4 +- .../cperf_test_pmd_cyclecount.c | 2 +- app/test-crypto-perf/cperf_test_throughput.c | 4 +- app/test-crypto-perf/cperf_test_verify.c | 2 +- doc/guides/tools/cryptoperf.rst | 142 ++++++++ usertools/configs/crypto-perf-aesni-gcm.json | 99 ++++++ usertools/configs/crypto-perf-aesni-mb.json | 108 ++++++ usertools/configs/crypto-perf-qat.json | 94 ++++++ usertools/dpdk-graph-crypto-perf.py | 309 ++++++++++++++++++ 10 files changed, 761 insertions(+), 6 deletions(-)
Quoted 5 lines
create mode 100644
usertools/configs/crypto-perf-aesni-gcm.jsoncreate mode 100644usertools/configs/crypto-perf-aesni-mb.jsoncreate mode 100644usertools/configs/crypto-perf-qat.jsoncreate mode 100755usertools/dpdk-graph-crypto-perf.py
Series Acked-by: Declan Doherty <[email protected]>
Akhil Goyal
AppliedQuoted 49 lines · Ciara Power
Quoted 42 lines
This patchset introduces a python script to run various crypto performance test cases, and graph the results in a consumable manner. The test suites are configured via JSON file. Some config files are provided, or the user may create one. Currently throughput and latency ptests for devices
crypto_qat,crypto_aesni_mbandcrypto_aesni_gcmare supported.The final collection of graphs are output in PDF format, with multiple PDFs per test suite, one for each graph type.
Some fixes are included for the throughput performance test and latency performance test csv outputs also.
v2:
- Reduced changes to only fix csv format for all perf test types.
- Added functionality for additional args such as config file, output directory and verbose.
- Improved help text for script.
- Improved script console output.
- Added support for latency test cases with burst or buffer size lists.
- Split config file into smaller config files, one for each device.
- Split output PDFs into smaller files, based on test suite graph types.
- Modified output directory naming and structure.
- Made some general improvements to script.
- Updated and improved documentation.Ciara Power (4):
test/cryptodev: fix latency test csv output test/cryptodev: fix csv output format
usertools: add script to graph crypto perf results
maintainers: update crypto perf app maintainersMAINTAINERS | 3 + app/test-crypto-perf/cperf_test_latency.c | 4 +- .../cperf_test_pmd_cyclecount.c | 2 +- app/test-crypto-perf/cperf_test_throughput.c | 4 +- app/test-crypto-perf/cperf_test_verify.c | 2 +- doc/guides/tools/cryptoperf.rst | 142 ++++++++ usertools/configs/crypto-perf-aesni-gcm.json | 99 ++++++ usertools/configs/crypto-perf-aesni-mb.json | 108 ++++++ usertools/configs/crypto-perf-qat.json | 94 ++++++ usertools/dpdk-graph-crypto-perf.py | 309 ++++++++++++++++++ 10 files changed, 761 insertions(+), 6 deletions(-)Quoted 5 lines
create mode 100644
usertools/configs/crypto-perf-aesni-gcm.jsoncreate mode 100644usertools/configs/crypto-perf-aesni-mb.jsoncreate mode 100644usertools/configs/crypto-perf-qat.jsoncreate mode 100755usertools/dpdk-graph-crypto-perf.py
Quoted 1 line
Series Acked-by: Declan Doherty <[email protected]>
Applied to dpdk-next-crypto
Thanks.
15/01/2021 16:54, Akhil Goyal:
Quoted 24 lines
Quoted 24 lines · Ciara Power
Quoted 22 lines
Ciara Power (4):
test/cryptodev: fix latency test csv output test/cryptodev: fix csv output format
usertools: add script to graph crypto perf results
maintainers: update crypto perf app maintainersMAINTAINERS | 3 + app/test-crypto-perf/cperf_test_latency.c | 4 +- .../cperf_test_pmd_cyclecount.c | 2 +- app/test-crypto-perf/cperf_test_throughput.c | 4 +- app/test-crypto-perf/cperf_test_verify.c | 2 +- doc/guides/tools/cryptoperf.rst | 142 ++++++++ usertools/configs/crypto-perf-aesni-gcm.json | 99 ++++++ usertools/configs/crypto-perf-aesni-mb.json | 108 ++++++ usertools/configs/crypto-perf-qat.json | 94 ++++++ usertools/dpdk-graph-crypto-perf.py | 309 ++++++++++++++++++ 10 files changed, 761 insertions(+), 6 deletions(-)create mode 100644
usertools/configs/crypto-perf-aesni-gcm.jsoncreate mode 100644usertools/configs/crypto-perf-aesni-mb.jsoncreate mode 100644usertools/configs/crypto-perf-qat.jsoncreate mode 100755usertools/dpdk-graph-crypto-perf.py
Quoted 3 lines
Quoted 1 line
Series Acked-by: Declan Doherty <[email protected]>
Applied to dpdk-next-crypto
Sorry I missed this series and I discover it when looking at the crypto tree. I see that the crypto perf script and configs are located in usertools. I think it should be with the app in app/test-crypto-perf/
The usertools directory is for tools used in production by end users.
Please consider changing the directory for the -rc2. Thanks
Quoted 29 lines
15/01/2021 16:54, Akhil Goyal:
Quoted 24 lines
Quoted 24 lines · Ciara Power
Quoted 22 lines
Ciara Power (4):
test/cryptodev: fix latency test csv output test/cryptodev: fix csv output format
usertools: add script to graph crypto perf results
maintainers: update crypto perf app maintainersMAINTAINERS | 3 + app/test-crypto-perf/cperf_test_latency.c | 4 +- .../cperf_test_pmd_cyclecount.c | 2 +- app/test-crypto-perf/cperf_test_throughput.c | 4 +- app/test-crypto-perf/cperf_test_verify.c | 2 +- doc/guides/tools/cryptoperf.rst | 142 ++++++++ usertools/configs/crypto-perf-aesni-gcm.json | 99 ++++++ usertools/configs/crypto-perf-aesni-mb.json | 108 ++++++ usertools/configs/crypto-perf-qat.json | 94 ++++++ usertools/dpdk-graph-crypto-perf.py | 309 ++++++++++++++++++ 10 files changed, 761 insertions(+), 6 deletions(-)create mode 100644
usertools/configs/crypto-perf-aesni-gcm.jsoncreate mode 100644usertools/configs/crypto-perf-aesni-mb.jsoncreate mode 100644usertools/configs/crypto-perf-qat.jsoncreate mode 100755usertools/dpdk-graph-crypto-perf.pyQuoted 3 lines
Quoted 1 line
Series Acked-by: Declan Doherty <[email protected]>
Applied to dpdk-next-crypto
Quoted 8 lines
Sorry I missed this series and I discover it when looking at the crypto tree. I see that the crypto perf script and configs are located in usertools. I think it should be with the app in app/test-crypto-perf/
The usertools directory is for tools used in production by end users.Please consider changing the directory for the -rc2. Thanks
Removed from next-crypto for now.
v3 cover add crypto perf test graphing script
In reply to Ciara PowerThis patchset introduces a python script to run various crypto performance test cases, and graph the results in a consumable manner. The test suites are configured via JSON file. Some config files are provided, or the user may create one. Currently throughput and latency ptests for devices crypto_qat, crypto_aesni_mb and crypto_aesni_gcm are supported.
The final collection of graphs are output in PDF format, with multiple PDFs per test suite, one for each graph type.
Some fixes are included for the throughput performance test and latency performance test csv outputs also.
v3:
- Moved script and configs to app/test-crypto-perf directory.
- Made changes to documentation and MAINTAINERS to reflect the above change.
v2:
- Reduced changes to only fix csv format for all perf test types.
- Added functionality for additional args such as config file, output directory and verbose.
- Improved help text for script.
- Improved script console output.
- Added support for latency test cases with burst or buffer size lists.
- Split config file into smaller config files, one for each device.
- Split output PDFs into smaller files, based on test suite graph types.
- Modified output directory naming and structure.
- Made some general improvements to script.
- Updated and improved documentation.
Ciara Power (4):
test/cryptodev: fix latency test csv output test/cryptodev: fix csv output format test/cryptodev: add script to graph perf results
maintainers: update crypto perf app maintainers
MAINTAINERS | 1 + .../configs/crypto-perf-aesni-gcm.json | 99 ++++++ .../configs/crypto-perf-aesni-mb.json | 108 ++++++ .../configs/crypto-perf-qat.json | 94 ++++++ app/test-crypto-perf/cperf_test_latency.c | 4 +- .../cperf_test_pmd_cyclecount.c | 2 +- app/test-crypto-perf/cperf_test_throughput.c | 4 +- app/test-crypto-perf/cperf_test_verify.c | 2 +- .../dpdk-graph-crypto-perf.py | 309 ++++++++++++++++++ doc/guides/tools/cryptoperf.rst | 143 ++++++++ 10 files changed, 760 insertions(+), 6 deletions(-) create mode 100644 app/test-crypto-perf/configs/crypto-perf-aesni-gcm.json create mode 100644 app/test-crypto-perf/configs/crypto-perf-aesni-mb.json create mode 100644 app/test-crypto-perf/configs/crypto-perf-qat.json create mode 100755 app/test-crypto-perf/dpdk-graph-crypto-perf.py
Signature · 1 line
2.25.1
PATCH v3 1/4 test/cryptodev: fix latency test csv output
The csv output for the latency performance test had an extra header, "Packet Size", which is a duplicate of "Buffer Size", and had no corresponding value in the output. This is now removed.
--- app/test-crypto-perf/cperf_test_latency.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
app/test-crypto-perf/cperf_test_latency.c +1 -1
@@ -310,7 +310,7 @@ cperf_latency_test_runner(void *arg)if (ctx->options->csv) {if (rte_atomic16_test_and_set (&display_once))printf ("\n# lcore, Buffer Size, Burst Size, Pakt Seq #, " -"Packet Size, cycles, time (us)" ); +"cycles, time (us)" );for (i =0 ; i < ctx->options->total_ops; i++) {
Signature · 1 line
2.25.1
PATCH v3 2/4 test/cryptodev: fix csv output format
In reply to Ciara PowerThe csv output for each ptest type used ";" instead of ",". This has now been fixed to use the comma format that is used in the csv headers.
---
v2:
- Reduced changes to only fix csv format.
--- app/test-crypto-perf/cperf_test_latency.c | 2 +- app/test-crypto-perf/cperf_test_pmd_cyclecount.c | 2 +- app/test-crypto-perf/cperf_test_throughput.c | 4 ++-- app/test-crypto-perf/cperf_test_verify.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-)
app/test-crypto-perf/cperf_test_latency.c +1 -1
@@ -314,7 +314,7 @@ cperf_latency_test_runner(void *arg)for (i =0 ; i < ctx->options->total_ops; i++) { - printf("\n%u;%u;%u;%"PRIu64";%"PRIu64";%.3f", + printf("\n%u,%u,%u,%"PRIu64",%"PRIu64",%.3f", ctx->lcore_id, ctx->options->test_buffer_size, test_burst_size, i + 1, ctx->res[i].tsc_end - ctx->res[i].tsc_start,
app/test-crypto-perf/cperf_test_pmd_cyclecount.c +1 -1
@@ -16,7 +16,7 @@#define PRETTY_HDR_FMT "%12s%12s%12s%12s%12s%12s%12s%12s%12s%12s\n\n"#define PRETTY_LINE_FMT "%12u%12u%12u%12u%12u%12u%12u%12.0f%12.0f%12.0f\n"#define CSV_HDR_FMT "%s,%s,%s,%s,%s,%s,%s,%s,%s,%s\n" -#define CSV_LINE_FMT "%10u;%10u;%u;%u;%u;%u;%u;%.3f;%.3f;%.3f\n" +#define CSV_LINE_FMT "%10u,%10u,%u,%u,%u,%u,%u,%.3f,%.3f,%.3f\n"struct cperf_pmd_cyclecount_ctx {uint8_t dev_id;
app/test-crypto-perf/cperf_test_throughput.c +2 -2
@@ -299,8 +299,8 @@ cperf_throughput_test_runner(void *test_ctx)"Failed Deq,Ops(Millions),Throughput(Gbps)," "Cycles/Buf\n\n"); - printf("%u;%u;%u;%"PRIu64";%"PRIu64";%"PRIu64";%"PRIu64";" - "%.3f;%.3f;%.3f\n", + printf("%u,%u,%u,%"PRIu64",%"PRIu64",%"PRIu64",%"PRIu64"," + "%.3f,%.3f,%.3f\n", ctx->lcore_id, ctx->options->test_buffer_size, test_burst_size,
app/test-crypto-perf/cperf_test_verify.c +1 -1
@@ -406,7 +406,7 @@ cperf_verify_test_runner(void *test_ctx)"Burst Size,Enqueued,Dequeued,Failed Enq," "Failed Deq,Failed Ops\n"); - printf("%10u;%10u;%u;%"PRIu64";%"PRIu64";%"PRIu64";%"PRIu64";" + printf("%10u,%10u,%u,%"PRIu64",%"PRIu64",%"PRIu64",%"PRIu64"," "%"PRIu64"\n", ctx->lcore_id, ctx->options->max_buffer_size,
Signature · 1 line
2.25.1
PATCH v3 3/4 test/cryptodev: add script to graph perf results
In reply to Ciara PowerThe python script introduced in this patch runs the crypto performance test application for various test cases, and graphs the results.
Test cases are defined in config JSON files, this is where parameters are specified for each test. Currently there are various test cases for devices crypto_qat, crypto_aesni_mb and crypto_gcm. Tests for the ptest types Throughput and Latency are supported for each.
The results of each test case are graphed and saved in PDFs (one PDF for each test suite graph type, with all test cases).
The graphs output include various grouped barcharts for throughput tests, and histogram and boxplot graphs are used for latency tests.
Documentation is added to outline the configuration and usage for the script.
Usage:
A JSON config file must be specified when running the script,
"./dpdk-graph-crypto-perf <config_file>"
The script uses the installed app by default (from ninja install). Alternatively we can pass path to app by
"-f <rel_path>/<build_dir>/app/dpdk-test-crypto-perf"
All device test suites are run by default. Alternatively we can specify by adding arguments,
"-t latency" - to run latency test suite only "-t throughput latency"
- to run both throughput and latency test suites
A directory can be specified for all output files, or the script directory is used by default.
"-o <output_dir>"
To see the output from the dpdk-test-crypto-perf app, use the verbose option "-v".
---
v3:
- Moved script and configs to app/test-crypto-perf directory.
- Made small changes to commit log, documentation and MAINTAINERS file to reflect the above change.
v2:
- Added functionality for additional args such as config file, output directory and verbose.
- Improved help text for script.
- Improved script console output.
- Added support for latency test cases with burst or buffer size lists.
- Split config file into smaller config files, one for each device.
- Split output PDFs into smaller files, based on test suite graph types.
- Modified output directory naming and structure.
- Made some general improvements to script.
- Updated and improved documentation.
- Updated copyright year.
--- .../configs/crypto-perf-aesni-gcm.json | 99 ++++++ .../configs/crypto-perf-aesni-mb.json | 108 ++++++ .../configs/crypto-perf-qat.json | 94 ++++++ .../dpdk-graph-crypto-perf.py | 309 ++++++++++++++++++ doc/guides/tools/cryptoperf.rst | 143 ++++++++ 5 files changed, 753 insertions(+) create mode 100644 app/test-crypto-perf/configs/crypto-perf-aesni-gcm.json create mode 100644 app/test-crypto-perf/configs/crypto-perf-aesni-mb.json create mode 100644 app/test-crypto-perf/configs/crypto-perf-qat.json create mode 100755 app/test-crypto-perf/dpdk-graph-crypto-perf.py
app/test-crypto-perf/configs/crypto-perf-aesni-gcm.json new file +99 -0
@@ -0,0 +1,99 @@ +{ + "throughput": { + "default": { + "eal": { + "l": "1,2", + "vdev": "crypto_aesni_gcm" + }, + "app": { + "csv-friendly": true, + "buffer-sz": "64,128,256,512,768,1024,1408,2048", + "burst-sz": "1,4,8,16,32", + "ptest": "throughput", + "devtype": "crypto_aesni_gcm" + } + }, + "AES-GCM-128 aead-op encrypt": { + "aead-algo": "aes-gcm", + "aead-key-sz": "16", + "aead-iv-sz": "12", + "aead-op": "encrypt", + "aead-aad-sz": "16", + "digest-sz": "16", + "optype": "aead", + "total-ops": "10000000" + }, + "AES-GCM-128 aead-op decrypt": { + "aead-algo": "aes-gcm", + "aead-key-sz": "16", + "aead-op": "decrypt", + "aead-aad-sz": "16", + "aead-iv-sz": "12", + "digest-sz": "16", + "optype": "aead", + "total-ops": "10000000" + }, + "AES-GCM-256 aead-op encrypt": { + "aead-algo": "aes-gcm", + "aead-key-sz": "32", + "aead-op": "encrypt", + "aead-aad-sz": "32", + "aead-iv-sz": "12", + "digest-sz": "16", + "optype": "aead", + "total-ops": "10000000" + }, + "AES-GCM-256 aead-op decrypt": { + "aead-algo": "aes-gcm", + "aead-key-sz": "32", + "aead-op": "decrypt", + "aead-aad-sz": "32", + "aead-iv-sz": "12", + "digest-sz": "16", + "optype": "aead", + "total-ops": "10000000" + }, + "AES-GMAC 128 auth-only generate": { + "auth-algo": "aes-gmac", + "auth-key-sz": "16", + "auth-iv-sz": "12", + "auth-op": "generate", + "digest-sz": "16", + "optype": "auth-only", + "total-ops": "10000000" + } + }, + "latency": { + "default": { + "eal": { + "l": "1,2", + "vdev": "crypto_aesni_gcm" + }, + "app": { + "csv-friendly": true, + "buffer-sz": "1024", + "burst-sz": "16", + "ptest": "latency", + "devtype": "crypto_aesni_gcm" + } + }, + "AES-GCM-128 aead-op decrypt": { + "aead-algo": "aes-gcm", + "aead-key-sz": "16", + "aead-op": "decrypt", + "aead-aad-sz": "16", + "aead-iv-sz": "12", + "digest-sz": "16", + "optype": "aead" + }, + "AES-GCM-256 aead-op encrypt latency": { + "aead-algo": "aes-gcm", + "aead-key-sz": "32", + "aead-op": "encrypt", + "aead-aad-sz": "32", + "aead-iv-sz": "12", + "digest-sz": "16", + "optype": "aead" + } + } +}
app/test-crypto-perf/configs/crypto-perf-aesni-mb.json new file +108 -0
108 lines not on this page · raw message
app/test-crypto-perf/configs/crypto-perf-qat.json new file +94 -0
94 lines not on this page · raw message
app/test-crypto-perf/dpdk-graph-crypto-perf.py new file +309 -0
309 lines not on this page · raw message
doc/guides/tools/cryptoperf.rst +143 -0
146 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH v3 4/4 maintainers: update crypto perf app maintainers
In reply to Ciara PowerThis patch adds a maintainer for the crypto perf test application, to cover the new perf test graphing script.
--- MAINTAINERS | 1 + 1 file changed, 1 insertion(+)
MAINTAINERS +1 -0
@@ -1585,6 +1585,7 @@ F: doc/guides/tools/comp_perf.rst Crypto performance test application M: Declan Doherty <[email protected]> +M: Ciara Power <[email protected]> T: git://dpdk.org/next/dpdk-next-crypto F: app/test-crypto-perf/ F: doc/guides/tools/cryptoperf.rst
Signature · 1 line
2.25.1
Quoted 9 lines
This patchset introduces a python script to run various crypto performance test cases, and graph the results in a consumable manner. The test suites are configured via JSON file. Some config files are provided, or the user may create one. Currently throughput and latency ptests for devices
crypto_qat,crypto_aesni_mbandcrypto_aesni_gcmare supported.The final collection of graphs are output in PDF format, with multiple PDFs per test suite, one for each graph type.
Quoted 7 lines
Some fixes are included for the throughput performance test and latency performance test csv outputs also.
v3:
- Moved script and configs to app/test-crypto-perf directory.
- Made changes to documentation andMAINTAINERSto reflect the above
change.
Series applied to dpdk-next-crypto
Thanks.