get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 85523,
    "url": "https://patches.dpdk.org/api/patches/85523/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20201220104148.13961-7-ophirmu@nvidia.com/",
    "project": {
        "id": 1,
        "url": "https://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": "<20201220104148.13961-7-ophirmu@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20201220104148.13961-7-ophirmu@nvidia.com",
    "date": "2020-12-20T10:41:48",
    "name": "[v2,6/6] app/regex: replace Linux clock() API with rdtsc",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "9dfce26f6f6d41ee215bd762972fd9265ead9dbc",
    "submitter": {
        "id": 1908,
        "url": "https://patches.dpdk.org/api/people/1908/?format=api",
        "name": "Ophir Munk",
        "email": "ophirmu@nvidia.com"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20201220104148.13961-7-ophirmu@nvidia.com/mbox/",
    "series": [
        {
            "id": 14389,
            "url": "https://patches.dpdk.org/api/series/14389/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=14389",
            "date": "2020-12-20T10:41:42",
            "name": "regex multi Q with multi cores support",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/14389/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/85523/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/85523/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 75F58A09FD;\n\tSun, 20 Dec 2020 11:44:00 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 63CD5CC4D;\n\tSun, 20 Dec 2020 11:42:25 +0100 (CET)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by dpdk.org (Postfix) with ESMTP id 50503CBAC\n for <dev@dpdk.org>; Sun, 20 Dec 2020 11:42:16 +0100 (CET)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n ophirmu@nvidia.com) with SMTP; 20 Dec 2020 12:42:10 +0200",
            "from nvidia.com (pegasus05.mtr.labs.mlnx [10.210.16.100])\n by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 0BKAg9q2031499;\n Sun, 20 Dec 2020 12:42:09 +0200"
        ],
        "From": "Ophir Munk <ophirmu@nvidia.com>",
        "To": "dev@dpdk.org, Ori Kam <orika@nvidia.com>, Ophir Munk <ophirmu@nvidia.com>",
        "Cc": "Thomas Monjalon <thomas@monjalon.net>",
        "Date": "Sun, 20 Dec 2020 10:41:48 +0000",
        "Message-Id": "<20201220104148.13961-7-ophirmu@nvidia.com>",
        "X-Mailer": "git-send-email 2.8.4",
        "In-Reply-To": "<20201220104148.13961-1-ophirmu@nvidia.com>",
        "References": "<20201216164931.1517-2-ophirmu@nvidia.com>\n <20201220104148.13961-1-ophirmu@nvidia.com>",
        "Subject": "[dpdk-dev] [PATCH v2 6/6] app/regex: replace Linux clock() API with\n\trdtsc",
        "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 <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 <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Performance measurement (elapsed time and Gbps) are based on Linux\nclock() API. The resolution is improved by replacing the clock() API\nwith rte_rdtsc_precise() API.\n\nSigned-off-by: Ophir Munk <ophirmu@nvidia.com>\n---\n app/test-regex/main.c | 32 ++++++++++++++------------------\n 1 file changed, 14 insertions(+), 18 deletions(-)",
    "diff": "diff --git a/app/test-regex/main.c b/app/test-regex/main.c\nindex e845655..aea4fa6 100644\n--- a/app/test-regex/main.c\n+++ b/app/test-regex/main.c\n@@ -48,8 +48,8 @@ struct qp_params {\n \tstruct rte_regex_ops **ops;\n \tstruct job_ctx *jobs_ctx;\n \tchar *buf;\n-\ttime_t start;\n-\ttime_t end;\n+\tuint64_t start;\n+\tuint64_t cycles;\n };\n \n struct qps_per_lcore {\n@@ -326,7 +326,7 @@ run_regex(void *args)\n \tunsigned long d_ind = 0;\n \tstruct rte_mbuf_ext_shared_info shinfo;\n \tint res = 0;\n-\tdouble time;\n+\tlong double time;\n \tstruct rte_mempool *mbuf_mp;\n \tstruct qp_params *qp;\n \tstruct qp_params *qps = NULL;\n@@ -419,7 +419,7 @@ run_regex(void *args)\n \t\tqp->buf = buf;\n \t\tqp->total_matches = 0;\n \t\tqp->start = 0;\n-\t\tqp->end = 0;\n+\t\tqp->cycles = 0;\n \t}\n \n \tfor (i = 0; i < nb_iterations; i++) {\n@@ -432,9 +432,8 @@ run_regex(void *args)\n \t\t\tupdate = false;\n \t\t\tfor (qp_id = 0; qp_id < nb_qps; qp_id++) {\n \t\t\t\tqp = &qps[qp_id];\n-\t\t\t\tif (!qp->start)\n-\t\t\t\t\tqp->start = clock();\n \t\t\t\tif (qp->total_dequeue < actual_jobs) {\n+\t\t\t\t\tqp->start = rte_rdtsc_precise();\n \t\t\t\t\tstruct rte_regex_ops **\n \t\t\t\t\t\tcur_ops_to_enqueue = qp->ops +\n \t\t\t\t\t\tqp->total_enqueue;\n@@ -463,24 +462,21 @@ run_regex(void *args)\n \t\t\t\t\t\t\tcur_ops_to_dequeue,\n \t\t\t\t\t\t\tqp->total_enqueue -\n \t\t\t\t\t\t\tqp->total_dequeue);\n+\t\t\t\t\tqp->cycles +=\n+\t\t\t\t\t     (rte_rdtsc_precise() - qp->start);\n \t\t\t\t\tupdate = true;\n-\t\t\t\t} else {\n-\t\t\t\t\tif (!qp->end)\n-\t\t\t\t\t\tqp->end = clock();\n \t\t\t\t}\n-\n \t\t\t}\n \t\t} while (update);\n \t}\n \tfor (qp_id = 0; qp_id < nb_qps; qp_id++) {\n-\t\ttime = ((double)qp->end - qp->start) / CLOCKS_PER_SEC;\n-\t\tprintf(\"Core=%u QP=%u\\n\", rte_lcore_id(), qp_id + qp_id_base);\n-\t\tprintf(\"Job len = %ld Bytes\\n\",  job_len);\n-\t\tprintf(\"Time = %lf sec\\n\",  time);\n-\t\tprintf(\"Perf = %lf Gbps\\n\\n\",\n-\t\t\t\t(((double)actual_jobs * job_len *\n-\t\t\t\tnb_iterations * 8) / time) /\n-\t\t\t\t1000000000.0);\n+\t\tqp = &qps[qp_id];\n+\t\ttime = (long double)qp->cycles / rte_get_timer_hz();\n+\t\tprintf(\"Core=%u QP=%u Job=%ld Bytes Time=%Lf sec Perf=%Lf \"\n+\t\t       \"Gbps\\n\", rte_lcore_id(), qp_id + qp_id_base,\n+\t\t       job_len, time,\n+\t\t       (((double)actual_jobs * job_len * nb_iterations * 8)\n+\t\t       / time) / 1000000000.0);\n \t}\n \n \tif (rgxc->perf_mode)\n",
    "prefixes": [
        "v2",
        "6/6"
    ]
}