From patchwork Thu Sep 6 17:09:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wang, Yipeng1" X-Patchwork-Id: 44368 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 F141F4D27; Fri, 7 Sep 2018 02:13:54 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 732E737B7 for ; Fri, 7 Sep 2018 02:13:49 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Sep 2018 17:13:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,340,1531810800"; d="scan'208";a="255176885" Received: from skx-yipeng.jf.intel.com ([10.54.81.175]) by orsmga005.jf.intel.com with ESMTP; 06 Sep 2018 17:13:47 -0700 From: Yipeng Wang To: pablo.de.lara.guarch@intel.com, bruce.richardson@intel.com Cc: dev@dpdk.org, yipeng1.wang@intel.com, michel@digirati.com.br, honnappa.nagarahalli@arm.com Date: Thu, 6 Sep 2018 10:09:02 -0700 Message-Id: <1536253745-133104-3-git-send-email-yipeng1.wang@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1536253745-133104-1-git-send-email-yipeng1.wang@intel.com> References: <1536253745-133104-1-git-send-email-yipeng1.wang@intel.com> Subject: [dpdk-dev] [PATCH v1 2/5] test: more accurate hash table 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 --- 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; } }