get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 55757,
    "url": "http://patches.dpdk.org/api/patches/55757/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1561980385-3223-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": "<1561980385-3223-5-git-send-email-tjozwiakgm@gmail.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1561980385-3223-5-git-send-email-tjozwiakgm@gmail.com",
    "date": "2019-07-01T11:26:23",
    "name": "[v5,4/6] app/test-compress-perf: add benchmark test case",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "297acaf3dc43f42ad45b6ae62fb1078f17e594c5",
    "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/1561980385-3223-5-git-send-email-tjozwiakgm@gmail.com/mbox/",
    "series": [
        {
            "id": 5242,
            "url": "http://patches.dpdk.org/api/series/5242/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=5242",
            "date": "2019-07-01T11:26:19",
            "name": "add multiple cores feature to test-compress-perf",
            "version": 5,
            "mbox": "http://patches.dpdk.org/series/5242/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/55757/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/55757/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 497C01B94F;\n\tMon,  1 Jul 2019 13:26:45 +0200 (CEST)",
            "from mail-lf1-f65.google.com (mail-lf1-f65.google.com\n\t[209.85.167.65]) by dpdk.org (Postfix) with ESMTP id 814504C99\n\tfor <dev@dpdk.org>; Mon,  1 Jul 2019 13:26:40 +0200 (CEST)",
            "by mail-lf1-f65.google.com with SMTP id p24so8533988lfo.6\n\tfor <dev@dpdk.org>; Mon, 01 Jul 2019 04:26:40 -0700 (PDT)",
            "from tj-idea-500s.lan (user-94-254-233-31.play-internet.pl.\n\t[94.254.233.31]) by smtp.gmail.com with ESMTPSA id\n\th3sm3211640lja.93.2019.07.01.04.26.38\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tMon, 01 Jul 2019 04:26:39 -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=2eidhsxPPlGF7RQ0xRYT3ZUxc4U3iFKgXVzbj63JUNc=;\n\tb=LlhDaPckj7PR9pRQ5M5aQ6Ya3NkuZRo+JrM8wDz+yrkoGBtBRtagsd+8oG33lsKXb7\n\tqvlMylpydhzqcj56PpQWiYIU7wR7xovhm/IeFn5IYVH/bVk+0mhGw4T8ypg3geOPerXj\n\tY3T5V/VgCaWDtBWF7R2Krutacui+DC61l9QlPDO+SegqYglx+cCj2eY7vfbZi3AQdlJF\n\t/UnPHS+jiiWHyqT1cu9u1bFoVndACfVZY/FTLNGqDyRfU+6voZDZXGHWOrx+W46vWowo\n\tLQXRMc98tx++Te1lUxx3nbCDXcBtd5rwwifUUE9YpjbKWoLm5KRrrH9mujHLh3u3OrrO\n\tXIjQ==",
        "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=2eidhsxPPlGF7RQ0xRYT3ZUxc4U3iFKgXVzbj63JUNc=;\n\tb=rRbsAc9P63gzLmOoqWkRGed0XaV4bfHyLCndcGtFhlnwIrlaPXWr+OpALpYumLmLPD\n\t2YTNc2mtxW7hLGQ4npeqTswQRxEfndM8szQozSuLpxfMAxR2SrJiFvcZnTVGfZLVLlIK\n\tIR37DsQ0Mwq9/dhL2tbB6BQCyj94RNuv6LLjF3FXCYMTWRxMxn9jwhOtPLB3V9hVH6Xt\n\tCdI3SFPN7WJofARVzdzA0KoWP4Gg/T6ut3UZsa6gHpvlw5tERSVtkckMmF9xkO8s7IVL\n\tVvTur+Q8DEPY5TIcWz1jzQNzMLGjFcvsuK2fkIlXQCIzZpRwwhwo91/o8JuAy3qHcI8+\n\tMYeg==",
        "X-Gm-Message-State": "APjAAAXn+Mx8YxvRmSJQ2MN4ifdUtSC9TaKVj2KYv1BfYbp4F9AgV7Eu\n\tVfsXabkKtrtBKKjX8PXJUm8dByBy0kA=",
        "X-Google-Smtp-Source": "APXvYqwmEl0CfvHkvjXGCM+l19Y8jZ/KE4Ll4fsPSQQJP2nv23dN+U22doPlQV3TGC/iqXzpcMPPsA==",
        "X-Received": "by 2002:ac2:5636:: with SMTP id b22mr8140609lff.2.1561980399711; \n\tMon, 01 Jul 2019 04:26:39 -0700 (PDT)",
        "From": "Tomasz Jozwiak <tjozwiakgm@gmail.com>",
        "To": "dev@dpdk.org, fiona.trahe@intel.com, tjozwiakgm@gmail.com,\n\tshallyv@marvell.com, arturx.trybula@intel.com",
        "Date": "Mon,  1 Jul 2019 13:26:23 +0200",
        "Message-Id": "<1561980385-3223-5-git-send-email-tjozwiakgm@gmail.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1561980385-3223-1-git-send-email-tjozwiakgm@gmail.com>",
        "References": "<1561674337-22086-1-git-send-email-tjozwiakgm@gmail.com>\n\t<1561980385-3223-1-git-send-email-tjozwiakgm@gmail.com>",
        "Subject": "[dpdk-dev] [PATCH v5 4/6] 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 <tjozwiakgm@gmail.com>\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 | 140 ++++++++++++++++------\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, 130 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..e0f852b 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,46 @@\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\treturn NULL;\n+\n+\tctx->ver.mem.dev_id = dev_id;\n+\tctx->ver.mem.qp_id = qp_id;\n+\tctx->ver.options = options;\n+\tctx->ver.silent = 1; /* ver. part will be silent */\n+\n+\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\treturn ctx;\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 +66,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 +75,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 +83,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 +102,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 +117,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 +148,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 +184,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 +201,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 +214,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 +235,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 +265,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 +286,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 51ca9f5..dd6ef9a 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": [
        "v5",
        "4/6"
    ]
}