get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/54573/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 54573,
    "url": "http://patches.dpdk.org/api/patches/54573/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1560032553-15528-5-git-send-email-tjozwiakgm@gmail.com/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<1560032553-15528-5-git-send-email-tjozwiakgm@gmail.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1560032553-15528-5-git-send-email-tjozwiakgm@gmail.com",
    "date": "2019-06-08T22:22:30",
    "name": "[v2,4/7] app/test-compress-perf: add benchmark test case",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "18c3050e742493be6cdef6134369a2e730c03592",
    "submitter": {
        "id": 1263,
        "url": "http://patches.dpdk.org/api/people/1263/?format=api",
        "name": "Tomasz Jóźwiak",
        "email": "tjozwiakgm@gmail.com"
    },
    "delegate": {
        "id": 6690,
        "url": "http://patches.dpdk.org/api/users/6690/?format=api",
        "username": "akhil",
        "first_name": "akhil",
        "last_name": "goyal",
        "email": "gakhil@marvell.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1560032553-15528-5-git-send-email-tjozwiakgm@gmail.com/mbox/",
    "series": [
        {
            "id": 4958,
            "url": "http://patches.dpdk.org/api/series/4958/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4958",
            "date": "2019-06-08T22:22:26",
            "name": "add multiple cores feature to test-compress-perf",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/4958/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/54573/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/54573/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 0BB281BD62;\n\tSun,  9 Jun 2019 00:22:54 +0200 (CEST)",
            "from mail-lj1-f196.google.com (mail-lj1-f196.google.com\n\t[209.85.208.196]) by dpdk.org (Postfix) with ESMTP id A817D1BD34\n\tfor <dev@dpdk.org>; Sun,  9 Jun 2019 00:22:47 +0200 (CEST)",
            "by mail-lj1-f196.google.com with SMTP id a21so4711884ljh.7\n\tfor <dev@dpdk.org>; Sat, 08 Jun 2019 15:22:47 -0700 (PDT)",
            "from tj-idea-500s.lan (user-5-173-144-53.play-internet.pl.\n\t[5.173.144.53]) by smtp.gmail.com with ESMTPSA id\n\tw28sm1060597ljd.12.2019.06.08.15.22.45\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tSat, 08 Jun 2019 15:22:46 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=from:to:subject:date:message-id:in-reply-to:references;\n\tbh=3KkzyV7KO0Ej2rTVWOQw1gnGRXsHt8o7Zmvoh9Lwheg=;\n\tb=OCbOo5+l35t1F5QT8+EtobHB0YsE9vOtspAD7zDOz3/xVb3qVxVl/DwbXGtd5L+SRt\n\tfplPGkkqPzyOXuNPwibxMVRT17xH06NTqhZ/3ibSVe+h5bb1KPv6kinSI/HS6I/SlLMr\n\t8P1e5jjkIOdChfTgjlxDZ0/4u+Gn+f4rPYCLrZKvww94CWNMhl8QXphym5Hnrg6nLkaa\n\tJeJzAgU5WSIAmDcbYBTWFnShaQsYtnmdLec6kzYa3VVCijO/XCG9GQUmaZE231TbD73m\n\tGKGTLN5moWjL3hNqgLY6oxQ5t5bfQ3AmFNtbG4dLdJNBlFTce1q7V38B45bYoytSk2Wn\n\tNRbQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=3KkzyV7KO0Ej2rTVWOQw1gnGRXsHt8o7Zmvoh9Lwheg=;\n\tb=Xku5WFVE47zNYEdKHzUbPn8fAuWnAHCF2aDzXKexxHkYfRwQCmoloHrLyJxZFSdn9w\n\t7PdZMYrykArX+z3QBH6Yv6thJS9DHuFE7rEZRZrg4echTD22fDqm5DWp5ky5RYgg+bN4\n\trALWiCN7lq434luRMvAyi4j1RvOJDwuxLGlpDplEpPD8M+4wfTfafocPb2RydY42KiBi\n\tKkUj2SwwNHrNMGR2ZQPrluuDleSFkPvEK7DZiwA1nIR0wqNIM9KgB8UlFm184qaJlUde\n\tlqB978NOjIvGL6pqO3JoC5ni2CHi7+k81UxUDBIYOWJCsBPEU8xnYlrpmn0pIyqEm8lW\n\t+vGg==",
        "X-Gm-Message-State": "APjAAAXLev5ymmPS53mJB0GnK7tZ3TFDJgPwRypzX4F+buN360fN3LJb\n\tqi2znl1xDFCVLrPH1UDhA2o+9yNhM1w=",
        "X-Google-Smtp-Source": "APXvYqzWkFV7HUHCo6Frj3yGRSVFxh6MCRwJlh1FCrAj8lKhcmJeF6NPXnBirj4t3qR1turCMBrHNQ==",
        "X-Received": "by 2002:a2e:9e1a:: with SMTP id\n\te26mr16249097ljk.158.1560032567066; \n\tSat, 08 Jun 2019 15:22:47 -0700 (PDT)",
        "From": "Tomasz Jozwiak <tjozwiakgm@gmail.com>",
        "To": "dev@dpdk.org, fiona.trahe@intel.com, tjozwiakgm@gmail.com,\n\tshallyv@marvell.com",
        "Date": "Sun,  9 Jun 2019 00:22:30 +0200",
        "Message-Id": "<1560032553-15528-5-git-send-email-tjozwiakgm@gmail.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1560032553-15528-1-git-send-email-tjozwiakgm@gmail.com>",
        "References": "<1559203588-24046-1-git-send-email-tomaszx.jozwiak@intel.com>\n\t<1560032553-15528-1-git-send-email-tjozwiakgm@gmail.com>",
        "Subject": "[dpdk-dev] [PATCH v2 4/7] app/test-compress-perf: add benchmark\n\ttest case",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "From: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>\n\nThis patch adds a benchmark part to\ncompression-perf-tool as a separate test case, which can be\nexecuted multi-threaded.\n\nSigned-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>\n---\n app/test-compress-perf/Makefile                   |   1 +\n app/test-compress-perf/comp_perf_test_benchmark.c | 139 ++++++++++++++++------\n app/test-compress-perf/comp_perf_test_benchmark.h |  25 +++-\n app/test-compress-perf/main.c                     |   1 +\n app/test-compress-perf/meson.build                |   1 +\n 5 files changed, 129 insertions(+), 38 deletions(-)",
    "diff": "diff --git a/app/test-compress-perf/Makefile b/app/test-compress-perf/Makefile\nindex f54d9a4..d1a6820 100644\n--- a/app/test-compress-perf/Makefile\n+++ b/app/test-compress-perf/Makefile\n@@ -13,6 +13,7 @@ CFLAGS += -O3\n SRCS-y := main.c\n SRCS-y += comp_perf_options_parse.c\n SRCS-y += comp_perf_test_verify.c\n+SRCS-y += comp_perf_test_benchmark.c\n SRCS-y += comp_perf_test_common.c\n \n include $(RTE_SDK)/mk/rte.app.mk\ndiff --git a/app/test-compress-perf/comp_perf_test_benchmark.c b/app/test-compress-perf/comp_perf_test_benchmark.c\nindex 5752906..9b0b146 100644\n--- a/app/test-compress-perf/comp_perf_test_benchmark.c\n+++ b/app/test-compress-perf/comp_perf_test_benchmark.c\n@@ -10,11 +10,45 @@\n \n #include \"comp_perf_test_benchmark.h\"\n \n+void\n+cperf_benchmark_test_destructor(void *arg)\n+{\n+\tif (arg) {\n+\t\tcomp_perf_free_memory(\n+\t\t\t\t&((struct cperf_benchmark_ctx *)arg)->ver.mem);\n+\t\trte_free(arg);\n+\t}\n+}\n+\n+void *\n+cperf_benchmark_test_constructor(uint8_t dev_id, uint16_t qp_id,\n+\t\tstruct comp_test_data *options)\n+{\n+\tstruct cperf_benchmark_ctx *ctx = NULL;\n+\n+\tctx = rte_malloc(NULL, sizeof(struct cperf_benchmark_ctx), 0);\n+\n+\tif (ctx != NULL) {\n+\t\tctx->ver.mem.dev_id = dev_id;\n+\t\tctx->ver.mem.qp_id = qp_id;\n+\t\tctx->ver.options = options;\n+\t\tctx->ver.silent = 1; /* ver. part will be silent */\n+\n+\t\tif (!comp_perf_allocate_memory(ctx->ver.options, &ctx->ver.mem)\n+\t\t\t      && !prepare_bufs(ctx->ver.options, &ctx->ver.mem))\n+\t\t\treturn ctx;\n+\t}\n+\n+\tcperf_benchmark_test_destructor(ctx);\n+\treturn NULL;\n+}\n+\n static int\n-main_loop(struct comp_test_data *test_data, uint8_t level,\n-\t\t\tenum rte_comp_xform_type type)\n+main_loop(struct cperf_benchmark_ctx *ctx, enum rte_comp_xform_type type)\n {\n-\tuint8_t dev_id = test_data->cdev_id;\n+\tstruct comp_test_data *test_data = ctx->ver.options;\n+\tstruct cperf_mem_resources *mem = &ctx->ver.mem;\n+\tuint8_t dev_id = mem->dev_id;\n \tuint32_t i, iter, num_iter;\n \tstruct rte_comp_op **ops, **deq_ops;\n \tvoid *priv_xform = NULL;\n@@ -31,7 +65,7 @@ main_loop(struct comp_test_data *test_data, uint8_t level,\n \t}\n \n \tops = rte_zmalloc_socket(NULL,\n-\t\t2 * test_data->total_bufs * sizeof(struct rte_comp_op *),\n+\t\t2 * mem->total_bufs * sizeof(struct rte_comp_op *),\n \t\t0, rte_socket_id());\n \n \tif (ops == NULL) {\n@@ -40,7 +74,7 @@ main_loop(struct comp_test_data *test_data, uint8_t level,\n \t\treturn -1;\n \t}\n \n-\tdeq_ops = &ops[test_data->total_bufs];\n+\tdeq_ops = &ops[mem->total_bufs];\n \n \tif (type == RTE_COMP_COMPRESS) {\n \t\txform = (struct rte_comp_xform) {\n@@ -48,14 +82,14 @@ main_loop(struct comp_test_data *test_data, uint8_t level,\n \t\t\t.compress = {\n \t\t\t\t.algo = RTE_COMP_ALGO_DEFLATE,\n \t\t\t\t.deflate.huffman = test_data->huffman_enc,\n-\t\t\t\t.level = level,\n+\t\t\t\t.level = test_data->level,\n \t\t\t\t.window_size = test_data->window_sz,\n \t\t\t\t.chksum = RTE_COMP_CHECKSUM_NONE,\n \t\t\t\t.hash_algo = RTE_COMP_HASH_ALGO_NONE\n \t\t\t}\n \t\t};\n-\t\tinput_bufs = test_data->decomp_bufs;\n-\t\toutput_bufs = test_data->comp_bufs;\n+\t\tinput_bufs = mem->decomp_bufs;\n+\t\toutput_bufs = mem->comp_bufs;\n \t\tout_seg_sz = test_data->out_seg_sz;\n \t} else {\n \t\txform = (struct rte_comp_xform) {\n@@ -67,8 +101,8 @@ main_loop(struct comp_test_data *test_data, uint8_t level,\n \t\t\t\t.hash_algo = RTE_COMP_HASH_ALGO_NONE\n \t\t\t}\n \t\t};\n-\t\tinput_bufs = test_data->comp_bufs;\n-\t\toutput_bufs = test_data->decomp_bufs;\n+\t\tinput_bufs = mem->comp_bufs;\n+\t\toutput_bufs = mem->decomp_bufs;\n \t\tout_seg_sz = test_data->seg_sz;\n \t}\n \n@@ -82,13 +116,13 @@ main_loop(struct comp_test_data *test_data, uint8_t level,\n \n \tuint64_t tsc_start, tsc_end, tsc_duration;\n \n-\ttsc_start = tsc_end = tsc_duration = 0;\n-\ttsc_start = rte_rdtsc();\n \tnum_iter = test_data->num_iter;\n+\ttsc_start = tsc_end = tsc_duration = 0;\n+\ttsc_start = rte_rdtsc_precise();\n \n \tfor (iter = 0; iter < num_iter; iter++) {\n-\t\tuint32_t total_ops = test_data->total_bufs;\n-\t\tuint32_t remaining_ops = test_data->total_bufs;\n+\t\tuint32_t total_ops = mem->total_bufs;\n+\t\tuint32_t remaining_ops = mem->total_bufs;\n \t\tuint32_t total_deq_ops = 0;\n \t\tuint32_t total_enq_ops = 0;\n \t\tuint16_t ops_unused = 0;\n@@ -113,7 +147,7 @@ main_loop(struct comp_test_data *test_data, uint8_t level,\n \n \t\t\t/* Allocate compression operations */\n \t\t\tif (ops_needed && !rte_comp_op_bulk_alloc(\n-\t\t\t\t\t\ttest_data->op_pool,\n+\t\t\t\t\t\tmem->op_pool,\n \t\t\t\t\t\t&ops[ops_unused],\n \t\t\t\t\t\tops_needed)) {\n \t\t\t\tRTE_LOG(ERR, USER1,\n@@ -149,7 +183,8 @@ main_loop(struct comp_test_data *test_data, uint8_t level,\n \t\t\t\tops[op_id]->private_xform = priv_xform;\n \t\t\t}\n \n-\t\t\tnum_enq = rte_compressdev_enqueue_burst(dev_id, 0, ops,\n+\t\t\tnum_enq = rte_compressdev_enqueue_burst(dev_id,\n+\t\t\t\t\t\t\t\tmem->qp_id, ops,\n \t\t\t\t\t\t\t\tnum_ops);\n \t\t\tif (num_enq == 0) {\n \t\t\t\tstruct rte_compressdev_stats stats;\n@@ -165,7 +200,8 @@ main_loop(struct comp_test_data *test_data, uint8_t level,\n \t\t\tremaining_ops -= num_enq;\n \t\t\ttotal_enq_ops += num_enq;\n \n-\t\t\tnum_deq = rte_compressdev_dequeue_burst(dev_id, 0,\n+\t\t\tnum_deq = rte_compressdev_dequeue_burst(dev_id,\n+\t\t\t\t\t\t\t   mem->qp_id,\n \t\t\t\t\t\t\t   deq_ops,\n \t\t\t\t\t\t\t   test_data->burst_sz);\n \t\t\ttotal_deq_ops += num_deq;\n@@ -177,7 +213,7 @@ main_loop(struct comp_test_data *test_data, uint8_t level,\n \t\t\t\t\tif (op->status !=\n \t\t\t\t\t\tRTE_COMP_OP_STATUS_SUCCESS) {\n \t\t\t\t\t\tRTE_LOG(ERR, USER1,\n-\t\t\t\t\t\t\t\"Some operations were not successful\\n\");\n+\t\t\t\t       \"Some operations were not successful\\n\");\n \t\t\t\t\t\tgoto end;\n \t\t\t\t\t}\n \n@@ -198,15 +234,17 @@ main_loop(struct comp_test_data *test_data, uint8_t level,\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n-\t\t\trte_mempool_put_bulk(test_data->op_pool,\n+\t\t\trte_mempool_put_bulk(mem->op_pool,\n \t\t\t\t\t     (void **)deq_ops, num_deq);\n \t\t\tallocated -= num_deq;\n \t\t}\n \n \t\t/* Dequeue the last operations */\n \t\twhile (total_deq_ops < total_ops) {\n-\t\t\tnum_deq = rte_compressdev_dequeue_burst(dev_id, 0,\n-\t\t\t\t\t\tdeq_ops, test_data->burst_sz);\n+\t\t\tnum_deq = rte_compressdev_dequeue_burst(dev_id,\n+\t\t\t\t\t\t\t   mem->qp_id,\n+\t\t\t\t\t\t\t   deq_ops,\n+\t\t\t\t\t\t\t   test_data->burst_sz);\n \t\t\tif (num_deq == 0) {\n \t\t\t\tstruct rte_compressdev_stats stats;\n \n@@ -226,7 +264,7 @@ main_loop(struct comp_test_data *test_data, uint8_t level,\n \t\t\t\t\tif (op->status !=\n \t\t\t\t\t\tRTE_COMP_OP_STATUS_SUCCESS) {\n \t\t\t\t\t\tRTE_LOG(ERR, USER1,\n-\t\t\t\t\t\t\t\"Some operations were not successful\\n\");\n+\t\t\t\t       \"Some operations were not successful\\n\");\n \t\t\t\t\t\tgoto end;\n \t\t\t\t\t}\n \n@@ -247,65 +285,92 @@ main_loop(struct comp_test_data *test_data, uint8_t level,\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n-\t\t\trte_mempool_put_bulk(test_data->op_pool,\n+\t\t\trte_mempool_put_bulk(mem->op_pool,\n \t\t\t\t\t     (void **)deq_ops, num_deq);\n \t\t\tallocated -= num_deq;\n \t\t}\n \t}\n \n-\ttsc_end = rte_rdtsc();\n+\ttsc_end = rte_rdtsc_precise();\n \ttsc_duration = tsc_end - tsc_start;\n \n \tif (type == RTE_COMP_COMPRESS)\n-\t\ttest_data->comp_tsc_duration[level] =\n+\t\tctx->comp_tsc_duration[test_data->level] =\n \t\t\t\ttsc_duration / num_iter;\n \telse\n-\t\ttest_data->decomp_tsc_duration[level] =\n+\t\tctx->decomp_tsc_duration[test_data->level] =\n \t\t\t\ttsc_duration / num_iter;\n \n end:\n-\trte_mempool_put_bulk(test_data->op_pool, (void **)ops, allocated);\n+\trte_mempool_put_bulk(mem->op_pool, (void **)ops, allocated);\n \trte_compressdev_private_xform_free(dev_id, priv_xform);\n \trte_free(ops);\n \treturn res;\n }\n \n int\n-cperf_benchmark(struct comp_test_data *test_data, uint8_t level)\n+cperf_benchmark_test_runner(void *test_ctx)\n {\n+\tstruct cperf_benchmark_ctx *ctx = test_ctx;\n+\tstruct comp_test_data *test_data = ctx->ver.options;\n+\tuint32_t lcore = rte_lcore_id();\n+\tstatic rte_atomic16_t display_once = RTE_ATOMIC16_INIT(0);\n+\n+\tctx->ver.mem.lcore_id = lcore;\n \tint i, ret = EXIT_SUCCESS;\n \n \t/*\n+\t * First the verification part is needed\n+\t */\n+\tif (cperf_verify_test_runner(&ctx->ver)) {\n+\t\tret =  EXIT_FAILURE;\n+\t\tgoto end;\n+\t}\n+\n+\t/*\n \t * Run the tests twice, discarding the first performance\n \t * results, before the cache is warmed up\n \t */\n \tfor (i = 0; i < 2; i++) {\n-\t\tif (main_loop(test_data, level, RTE_COMP_COMPRESS) < 0) {\n+\t\tif (main_loop(ctx, RTE_COMP_COMPRESS) < 0) {\n \t\t\tret = EXIT_FAILURE;\n \t\t\tgoto end;\n \t\t}\n \t}\n \n \tfor (i = 0; i < 2; i++) {\n-\t\tif (main_loop(test_data, level, RTE_COMP_DECOMPRESS) < 0) {\n+\t\tif (main_loop(ctx, RTE_COMP_DECOMPRESS) < 0) {\n \t\t\tret = EXIT_FAILURE;\n \t\t\tgoto end;\n \t\t}\n \t}\n \n-\ttest_data->comp_tsc_byte =\n-\t\t\t(double)(test_data->comp_tsc_duration[level]) /\n+\tctx->comp_tsc_byte =\n+\t\t\t(double)(ctx->comp_tsc_duration[test_data->level]) /\n \t\t\t\t\ttest_data->input_data_sz;\n \n-\ttest_data->decomp_tsc_byte =\n-\t\t\t(double)(test_data->decomp_tsc_duration[level]) /\n+\tctx->decomp_tsc_byte =\n+\t\t\t(double)(ctx->decomp_tsc_duration[test_data->level]) /\n \t\t\t\t\ttest_data->input_data_sz;\n \n-\ttest_data->comp_gbps = rte_get_tsc_hz() / test_data->comp_tsc_byte * 8 /\n+\tctx->comp_gbps = rte_get_tsc_hz() / (ctx->comp_tsc_byte * 8) /\n+\t\t\t1000000000;\n+\n+\tctx->decomp_gbps = rte_get_tsc_hz() / (ctx->decomp_tsc_byte * 8) /\n \t\t\t1000000000;\n \n-\ttest_data->decomp_gbps = rte_get_tsc_hz() / test_data->decomp_tsc_byte\n-\t\t\t* 8 / 1000000000;\n+\tif (rte_atomic16_test_and_set(&display_once)) {\n+\t\tprintf(\"%12s%6s%12s%17s%15s%16s\\n\",\n+\t\t\t\"lcore id\", \"Level\", \"Comp size\", \"Comp ratio [%]\",\n+\t\t\t\"Comp [Gbps]\", \"Decomp [Gbps]\");\n+\t}\n+\n+\tprintf(\"%12u%6u%12zu%17.2f%15.2f%16.2f\\n\",\n+\t\tctx->ver.mem.lcore_id,\n+\t\ttest_data->level, ctx->ver.comp_data_sz, ctx->ver.ratio,\n+\t\tctx->comp_gbps,\n+\t\tctx->decomp_gbps);\n+\n end:\n \treturn ret;\n }\ndiff --git a/app/test-compress-perf/comp_perf_test_benchmark.h b/app/test-compress-perf/comp_perf_test_benchmark.h\nindex b193445..d9b2694 100644\n--- a/app/test-compress-perf/comp_perf_test_benchmark.h\n+++ b/app/test-compress-perf/comp_perf_test_benchmark.h\n@@ -5,9 +5,32 @@\n #ifndef _COMP_PERF_TEST_BENCHMARK_\n #define _COMP_PERF_TEST_BENCHMARK_\n \n+#include <stdint.h>\n+\n #include \"comp_perf_options.h\"\n+#include \"comp_perf_test_common.h\"\n+#include \"comp_perf_test_verify.h\"\n+\n+struct cperf_benchmark_ctx {\n+\tstruct cperf_verify_ctx ver;\n+\n+\t/* Store TSC duration for all levels (including level 0) */\n+\tuint64_t comp_tsc_duration[RTE_COMP_LEVEL_MAX + 1];\n+\tuint64_t decomp_tsc_duration[RTE_COMP_LEVEL_MAX + 1];\n+\tdouble comp_gbps;\n+\tdouble decomp_gbps;\n+\tdouble comp_tsc_byte;\n+\tdouble decomp_tsc_byte;\n+};\n+\n+void\n+cperf_benchmark_test_destructor(void *arg);\n \n int\n-cperf_benchmark(struct comp_test_data *test_data, uint8_t level);\n+cperf_benchmark_test_runner(void *test_ctx);\n+\n+void *\n+cperf_benchmark_test_constructor(uint8_t dev_id, uint16_t qp_id,\n+\t\tstruct comp_test_data *options);\n \n #endif\ndiff --git a/app/test-compress-perf/main.c b/app/test-compress-perf/main.c\nindex 42ffb0d..f8e5f15 100644\n--- a/app/test-compress-perf/main.c\n+++ b/app/test-compress-perf/main.c\n@@ -9,6 +9,7 @@\n \n #include \"comp_perf_options.h\"\n #include \"comp_perf_test_verify.h\"\n+#include \"comp_perf_test_benchmark.h\"\n #include \"comp_perf.h\"\n #include \"comp_perf_test_common.h\"\n \ndiff --git a/app/test-compress-perf/meson.build b/app/test-compress-perf/meson.build\nindex c6246e5..1136f04 100644\n--- a/app/test-compress-perf/meson.build\n+++ b/app/test-compress-perf/meson.build\n@@ -5,5 +5,6 @@ allow_experimental_apis = true\n sources = files('comp_perf_options_parse.c',\n \t\t'main.c',\n \t\t'comp_perf_test_verify.c',\n+\t\t'comp_perf_test_benchmark.c',\n \t\t'comp_perf_test_common.c')\n deps = ['compressdev']\n",
    "prefixes": [
        "v2",
        "4/7"
    ]
}