From patchwork Wed Sep 26 12:54:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wang, Yipeng1" X-Patchwork-Id: 45452 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D74461B48C; Wed, 26 Sep 2018 21:59:35 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 5DBA11B45E for ; Wed, 26 Sep 2018 21:59:23 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Sep 2018 12:59:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,307,1534834800"; d="scan'208";a="266959374" Received: from skx-yipeng.jf.intel.com ([10.54.81.175]) by fmsmga006.fm.intel.com with ESMTP; 26 Sep 2018 12:59:17 -0700 From: Yipeng Wang To: bruce.richardson@intel.com Cc: dev@dpdk.org, yipeng1.wang@intel.com, honnappa.nagarahalli@arm.com, sameh.gobriel@intel.com Date: Wed, 26 Sep 2018 05:54:22 -0700 Message-Id: <1537966465-248530-3-git-send-email-yipeng1.wang@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537966465-248530-1-git-send-email-yipeng1.wang@intel.com> References: <1536253745-133104-1-git-send-email-yipeng1.wang@intel.com> <1537966465-248530-1-git-send-email-yipeng1.wang@intel.com> Subject: [dpdk-dev] [PATCH v3 2/5] test/hash: more accurate hash perf test output X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Edit the printf information when error happens to be more accurate and informative. Signed-off-by: Yipeng Wang Acked-by: Bruce Richardson --- test/test/test_hash_perf.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/test/test_hash_perf.c b/test/test/test_hash_perf.c index 9ed7125..4d00c20 100644 --- a/test/test/test_hash_perf.c +++ b/test/test/test_hash_perf.c @@ -248,7 +248,7 @@ timed_adds(unsigned with_hash, unsigned with_data, unsigned table_index) (const void *) keys[i], signatures[i], data); if (ret < 0) { - printf("Failed to add key number %u\n", ret); + printf("H+D: Failed to add key number %u\n", i); return -1; } } else if (with_hash && !with_data) { @@ -258,7 +258,7 @@ timed_adds(unsigned with_hash, unsigned with_data, unsigned table_index) if (ret >= 0) positions[i] = ret; else { - printf("Failed to add key number %u\n", ret); + printf("H: Failed to add key number %u\n", i); return -1; } } else if (!with_hash && with_data) { @@ -266,7 +266,7 @@ timed_adds(unsigned with_hash, unsigned with_data, unsigned table_index) (const void *) keys[i], data); if (ret < 0) { - printf("Failed to add key number %u\n", ret); + printf("D: Failed to add key number %u\n", i); return -1; } } else { @@ -274,7 +274,7 @@ timed_adds(unsigned with_hash, unsigned with_data, unsigned table_index) if (ret >= 0) positions[i] = ret; else { - printf("Failed to add key number %u\n", ret); + printf("Failed to add key number %u\n", i); return -1; } } @@ -442,7 +442,7 @@ timed_deletes(unsigned with_hash, unsigned with_data, unsigned table_index) if (ret >= 0) positions[i] = ret; else { - printf("Failed to add key number %u\n", ret); + printf("Failed to delete key number %u\n", i); return -1; } }