From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3074243BA2; Fri, 23 Feb 2024 10:45:24 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 56ACF41060; Fri, 23 Feb 2024 10:45:23 +0100 (CET) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id D1317402ED; Fri, 23 Feb 2024 10:45:21 +0100 (CET) Received: from mail.maildlp.com (unknown [172.19.88.105]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Th4nZ6LGqzvVpB; Fri, 23 Feb 2024 17:43:14 +0800 (CST) Received: from dggpeml500024.china.huawei.com (unknown [7.185.36.10]) by mail.maildlp.com (Postfix) with ESMTPS id 6BD661404F1; Fri, 23 Feb 2024 17:45:19 +0800 (CST) Received: from [10.67.121.161] (10.67.121.161) by dggpeml500024.china.huawei.com (7.185.36.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Fri, 23 Feb 2024 17:45:19 +0800 Subject: Re: [PATCH] app/dma-perf: add average latency per worker To: Vipin Varghese , , , , , References: <20231219164021.858-1-vipin.varghese@amd.com> From: fengchengwen Message-ID: <9acefd53-f617-28c1-1d6b-21b137d336eb@huawei.com> Date: Fri, 23 Feb 2024 17:45:18 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <20231219164021.858-1-vipin.varghese@amd.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.121.161] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpeml500024.china.huawei.com (7.185.36.10) X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Hi Vipin, On 2023/12/20 0:40, Vipin Varghese wrote: > Modify the user display data with total average latency per worker. > > Signed-off-by: Vipin Varghese > --- > app/test-dma-perf/benchmark.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/app/test-dma-perf/benchmark.c b/app/test-dma-perf/benchmark.c > index 9b1f58c78c..8b6886af62 100644 > --- a/app/test-dma-perf/benchmark.c > +++ b/app/test-dma-perf/benchmark.c > @@ -470,7 +470,8 @@ mem_copy_benchmark(struct test_configure *cfg, bool is_dma) > bandwidth_total += bandwidth; > avg_cycles_total += avg_cycles; > } > - printf("\nTotal Bandwidth: %.3lf Gbps, Total MOps: %.3lf\n", bandwidth_total, mops_total); > + printf("\nAverage Cycles/op: %.2lf, Total Bandwidth: %.3lf Gbps, Total MOps: %.3lf\n", > + (float) avg_cycles_total / nb_workers, bandwidth_total, mops_total); Because this is total stats, suggest add Total prefix, e.g. "Total Average Cycles/op" I think print format keep one-digit precision is enough. Also please modify CSV_TOTAL_LINE_FMT make sure the csv also have same precision of Cycles/op. Thanks > snprintf(output_str[MAX_WORKER_NB], MAX_OUTPUT_STR_LEN, CSV_TOTAL_LINE_FMT, > cfg->scenario_id, nr_buf, memory * nb_workers, > avg_cycles_total / nb_workers, bandwidth_total, mops_total); >