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 AF10043C27; Fri, 8 Mar 2024 02:16:02 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5011540291; Fri, 8 Mar 2024 02:16:02 +0100 (CET) Received: from szxga07-in.huawei.com (szxga07-in.huawei.com [45.249.212.35]) by mails.dpdk.org (Postfix) with ESMTP id CFFF340284 for ; Fri, 8 Mar 2024 02:15:59 +0100 (CET) Received: from mail.maildlp.com (unknown [172.19.163.17]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4TrSq160Zzz1X3Pt; Fri, 8 Mar 2024 09:13:33 +0800 (CST) Received: from dggpeml500024.china.huawei.com (unknown [7.185.36.10]) by mail.maildlp.com (Postfix) with ESMTPS id B567D1A0172; Fri, 8 Mar 2024 09:15:56 +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, 8 Mar 2024 09:15:56 +0800 Subject: Re: [PATCH v2] app/dma-perf: add average latency per worker To: Vipin Varghese , CC: , References: <20231219164021.858-1-vipin.varghese@amd.com> <20240306150628.1417-1-vipin.varghese@amd.com> From: fengchengwen Message-ID: <0526dd9f-aeda-af3f-fd94-70392bd13fab@huawei.com> Date: Fri, 8 Mar 2024 09:15:56 +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: <20240306150628.1417-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: dggems706-chm.china.huawei.com (10.3.19.183) 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 2024/3/6 23:06, Vipin Varghese wrote: > Modify the user display data with total average latency per worker. > > Signed-off-by: Vipin Varghese > > V2 Changes: > - keep one-digit precision is enough, suggested by Chengwen > --- > 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..2e110d0d98 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 per worker: %.1f, Total Bandwidth: %.3lf Gbps, Total MOps: %.3lf\n", > + (avg_cycles_total * (float) 1.0) / nb_workers, bandwidth_total, mops_total); > 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); As previous mentioned, please make sure the csv format and the above snprintf also modified (make sure stdout and csv has the same value). >