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 D709D43C27; Fri, 8 Mar 2024 20:07:13 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A6B27402E2; Fri, 8 Mar 2024 20:07:13 +0100 (CET) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2045.outbound.protection.outlook.com [40.107.101.45]) by mails.dpdk.org (Postfix) with ESMTP id 632D140274 for ; Fri, 8 Mar 2024 20:07:12 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HyE/nhMssu3HW0Ldih8otDd/JUwhRgcuscvEeI72pqbmv+1ugujluYtO3o9ZptJb+Y7J6Gn3gAqnrQ58ZTGXa2M5oEPxDG2k0RYlRsWcXqC1XSjmi9XGeTcVy3tevvuVbEmNHi8N4itXdqe9hNqKlkOaJ8adciXBlsSPrUM+IooTtfj7iqj7b5qzG9wp47ZQuHBLKkDSEPhOJml6aPfh/12J+TYZTQDxN9WDWiQDDbWQfWpFdABSeFrqRvmw5HFPqt3JLqZMZiu9NZy5qCrdYO5RafYJRsNcfbWwHB0j1KxThEannAz7M4bXaJ+YW4EFj6eLkzWhYxEycaL/wyaa9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=zX58bzZ1RIzLKDzIt+5jvpvrfpmiRr+Dfd0RYsJ9XSI=; b=aJfC0/MVe8gWF6QC5bLvsS8lwvuYFanjAVg3s8yJdgwc24BAyB6oM7FA7eG9ZiWa/EpQLcLTmP+AKbefnfbMyuFgqrZhUjhHOXnhtYf82H2GfbPY1k/DQ2WmNMJgP2qH7xr/mlOeau3jotKbWTSWfdxWtLgZxiTFybAud65tePlLNb5ePKVt+w8X7C550k4TuM72HzRttXjDgmsop+g83SWafUWhvNl3zH1oxrlD1MZTE+c9FJDLG/WBP9UAiUNAH3dbYub5lvHQpiNh45cMpyTliZ6JnFfTyrnFNkyzXBtLQ4/zysty9fc11D6tmXgUxXP2d/24RbYlyjbgRHkmYg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=dpdk.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zX58bzZ1RIzLKDzIt+5jvpvrfpmiRr+Dfd0RYsJ9XSI=; b=RrVD1bl9fPrQ+/wPeW8bIBdW2U2439lCUEaMbKFN+ezc5TeS98ENODiDZrqFD08+Vh7Ett5KM3JqP4X0RUYY2EKboVmlTUWom/kYZrz5QC2AfdAabAUogc9V7cCHzaD0/KD+ugyq0L/63zt+1O10DZ1CAO2/85h8R9wdGajbZBE= Received: from CY5PR15CA0258.namprd15.prod.outlook.com (2603:10b6:930:66::29) by MN2PR12MB4285.namprd12.prod.outlook.com (2603:10b6:208:1d7::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.31; Fri, 8 Mar 2024 19:07:07 +0000 Received: from CY4PEPF0000E9D5.namprd05.prod.outlook.com (2603:10b6:930:66:cafe::c7) by CY5PR15CA0258.outlook.office365.com (2603:10b6:930:66::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.29 via Frontend Transport; Fri, 8 Mar 2024 19:07:06 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CY4PEPF0000E9D5.mail.protection.outlook.com (10.167.241.76) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7362.11 via Frontend Transport; Fri, 8 Mar 2024 19:07:06 +0000 Received: from BLR-5CG134626B.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Fri, 8 Mar 2024 13:07:01 -0600 From: Vipin Varghese To: , CC: , Subject: [PATCH v3] app/dma-perf: add average latency per worker Date: Sat, 9 Mar 2024 00:36:46 +0530 Message-ID: <20240308190646.1456-1-vipin.varghese@amd.com> X-Mailer: git-send-email 2.41.0.windows.3 In-Reply-To: <20240306150628.1417-1-vipin.varghese@amd.com> References: <20240306150628.1417-1-vipin.varghese@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000E9D5:EE_|MN2PR12MB4285:EE_ X-MS-Office365-Filtering-Correlation-Id: 153de342-f309-4518-b6ac-08dc3fa2f2a0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lxCFOh9EyjtlTG018NdqJ5p2A0JmMbUaFZRcLm5MvzolccEndhBDN9aYjQ+Pm0GNxvNktUNNhcK0QQfrJ+vE5WxjChGk6lhUZ3z4f5xn4Ub7tNzpsO759jVSqp5bTlPkHf0wcDaTuUNUcHRAbZbzwI/FtQC2FT+5ZBETV7+AX+aRwNXeqd3jJxDZfEHNCWgQt9cHKYmSGFI2MgvmKNmXmugKZGH6wbHBUSpltmIHPJCi+1uVLshGIuRRGZVDqZU5LDFgN4W9CIXFZV7WzcyIpMwnxJckiGACpDE/iIc/nh6sAlCvufvEbyJVSKd/A8pnTGR5qeKS/y13FGdxQuiHPf8uytJVdyLazy13a5vMfBhi7KBncu7SOuYw6qlifRXcLGSYDlKOAHy1gbH/AfBjatMU7ikZkWj3HLSuwFuoDyEqK5CFSzQwYl086nJ865R/JpHDQcus5/n86eMoAUfZeytS3vHfFypYHjjpFk9mQEnCk5+mpnVpyJyTlirjxh8xT5k3loz3zk3+bHTR8MHOVxZoQngnTEB6lkw9v4gcLq99Vi4//q/YbxZtRXEHLBYeBGUBDip56KAvXSt+i4+/W8EKYX4B/E55v6yWvBRQl6A9QXccyqOLfLYnQoPiBD+PGyX63jdr50qysa0+kb2uJFTIXmN6G34IF2/Bdidi3G4/skLtfC7qzdwBVT7OJVZZqhUjgGH2Q3mcRXVCbxg+tXUVUWDL9CS85afpF281IlzYwVPv4fapJv9fUX3zCHAF X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(82310400014)(36860700004)(1800799015)(376005); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Mar 2024 19:07:06.6544 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 153de342-f309-4518-b6ac-08dc3fa2f2a0 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000E9D5.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4285 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 Modify the user information with total average latency per worker in both CSV and console logs. Signed-off-by: Vipin Varghese V3 Changes: - update CSV_TOTAL_LINE_FMT to change Avg Cycles / op per worker V2 Changes: - keep one-digit precision is enough, suggested by Chengwen --- app/test-dma-perf/benchmark.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/test-dma-perf/benchmark.c b/app/test-dma-perf/benchmark.c index 9b1f58c78c..fca3ba24f7 100644 --- a/app/test-dma-perf/benchmark.c +++ b/app/test-dma-perf/benchmark.c @@ -23,7 +23,7 @@ #define CSV_LINE_DMA_FMT "Scenario %u,%u,%s,%u,%u,%u,%u,%.2lf,%" PRIu64 ",%.3lf,%.3lf\n" #define CSV_LINE_CPU_FMT "Scenario %u,%u,NA,NA,NA,%u,%u,%.2lf,%" PRIu64 ",%.3lf,%.3lf\n" -#define CSV_TOTAL_LINE_FMT "Scenario %u Summary, , , , , ,%u,%.2lf,%u,%.3lf,%.3lf\n" +#define CSV_TOTAL_LINE_FMT "Scenario %u Summary, , , , , ,%u,%.2lf,%.1lf,%.3lf,%.3lf\n" struct worker_info { bool ready_flag; @@ -470,10 +470,11 @@ 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: %.1lf, 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); + (avg_cycles_total * (float) 1.0) / nb_workers, bandwidth_total, mops_total); out: /* free mbufs used in the test */ -- 2.39.3