Message ID | 20230607162700.3234712-8-kan.liang@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp329923vqr; Wed, 7 Jun 2023 09:36:06 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5ttmjw+/4xm6mUr5IOf3zMgHbTXRe3yBrxrxHhRmEre25+t4/DxnupscWX8l7EMrMBgdg7 X-Received: by 2002:a05:6a20:1608:b0:fa:1f3a:8f56 with SMTP id l8-20020a056a20160800b000fa1f3a8f56mr4361173pzj.12.1686155765298; Wed, 07 Jun 2023 09:36:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686155765; cv=none; d=google.com; s=arc-20160816; b=G1Z+3vKbOoQg+u78JyXRz1as7oO0SkBu/CiEH+SGsHBB21EXHkd6pmepwDamN581c9 wA+gsbrfWNbQ2olhvIsgDpVneTpap6NwO4aJmu1SWuekU06UNiZaiLawG8OoJbkLNLok FddyL22AvNPj/bvn9f3Ld6H88pvqvYst+/tObgCMSg376dZCnS4ZB6GMkPcpVcSkQ/kz XU7lK02NJnBs9Z9P9IpcEvJ3pMSnBLSVQYASY91QQxSxPt+GDt9qnmLJ10jb4uSI1tBN 7AzKmUJQbhD/sYR41NIZIt3nCMOzOdP6NPxqwqovU0wlFBVAboqJzjpGdu2wXZpk31Ro +kcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=1b7DR9mniE4FiYR21qvq3+qElyNJqb80Svl5hP+hsQk=; b=GwLfNIG1GvvPuJMNyIVzpUA71ftyeHcL5eYXjpqw8G3CezIWNKp+yqvIxdfDRrESbx DfvbSA02ilfnrP6XutKshntLlDYJ+uf1icU3JqUZD9gUFHvtfjTd1uAr18iIoz2f3L0q 3fsnrHJjf9gNS/VVhC8imnwUW/EeVUYtYmxVM5iqY3ZBNhzSb0xMmlNfYnftWToFoaS2 yiY4vMHQqT+F1swgzJ5i52vPxee6gE7CYfsyZhG06NyyrkmKGZaAE7pt8RPGPmqc2+z8 E34EMczaizBGoO+BYx/23kK7ztH+kZCRf9f492KB67QhWEWx0LxEO3EudJV5KxqIGa5k m8Yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ADxPRujg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 83-20020a630056000000b005250385bfdbsi9498871pga.549.2023.06.07.09.35.51; Wed, 07 Jun 2023 09:36:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ADxPRujg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231911AbjFGQ1m (ORCPT <rfc822;literming00@gmail.com> + 99 others); Wed, 7 Jun 2023 12:27:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231438AbjFGQ1d (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 7 Jun 2023 12:27:33 -0400 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4554D1BFF; Wed, 7 Jun 2023 09:27:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686155246; x=1717691246; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=mwsZmUxJwi+9RiW1rvq0psUPvV+FPhuABjckNf+s/B4=; b=ADxPRujgbN8HWVJtM/3mZcougAbby7OFQB2HNGUtmhGrHcLU40qBuVmh ZRXVNMnZDXy4prqT084+UHZk+9LW6jEkdrYfd2lGR2z4sNHlcDBuPqkp/ xQSLARp4ubgIIuDAd+cz+PPdSUzjRhcOjQ96rcEaWpB3Y8TOzhE7P+GQg iTRWPlmXWwjZOTWh190guf9bVhsL1LtA/cuYaGM63FWEw53K4bN7vn5O2 maOd7m1g9w4dTtWNYgEFdR/Cvw6ZW/w9O7S2gs9a14l9W+U517AxhQXdU PkssI/4OzASFiaDQR4f7Fa6tW+3Fogk+EQKWawt3YTsoU3JyQne7c0Vgo A==; X-IronPort-AV: E=McAfee;i="6600,9927,10734"; a="355892673" X-IronPort-AV: E=Sophos;i="6.00,224,1681196400"; d="scan'208";a="355892673" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jun 2023 09:27:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10734"; a="774697683" X-IronPort-AV: E=Sophos;i="6.00,224,1681196400"; d="scan'208";a="774697683" Received: from kanliang-dev.jf.intel.com ([10.165.154.102]) by fmsmga008.fm.intel.com with ESMTP; 07 Jun 2023 09:27:23 -0700 From: kan.liang@linux.intel.com To: acme@kernel.org, mingo@redhat.com, peterz@infradead.org, irogers@google.com, namhyung@kernel.org, jolsa@kernel.org, adrian.hunter@intel.com, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Cc: ak@linux.intel.com, eranian@google.com, ahmad.yasin@intel.com, Kan Liang <kan.liang@linux.intel.com> Subject: [PATCH 7/8] pert tests: Support metricgroup perf stat JSON output Date: Wed, 7 Jun 2023 09:26:59 -0700 Message-Id: <20230607162700.3234712-8-kan.liang@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230607162700.3234712-1-kan.liang@linux.intel.com> References: <20230607162700.3234712-1-kan.liang@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768062468149212946?= X-GMAIL-MSGID: =?utf-8?q?1768062468149212946?= |
Series |
New metricgroup output in perf stat default mode
|
|
Commit Message
Liang, Kan
June 7, 2023, 4:26 p.m. UTC
From: Kan Liang <kan.liang@linux.intel.com> A new field metricgroup has been added in the perf stat JSON output. Support it in the test case. Signed-off-by: Kan Liang <kan.liang@linux.intel.com> --- tools/perf/tests/shell/lib/perf_json_output_lint.py | 3 +++ 1 file changed, 3 insertions(+)
Comments
On Wed, Jun 7, 2023 at 9:27 AM <kan.liang@linux.intel.com> wrote: > > From: Kan Liang <kan.liang@linux.intel.com> > > A new field metricgroup has been added in the perf stat JSON output. > Support it in the test case. > > Signed-off-by: Kan Liang <kan.liang@linux.intel.com> Acked-by: Ian Rogers <irogers@google.com> Thanks, Ian > --- > tools/perf/tests/shell/lib/perf_json_output_lint.py | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/tools/perf/tests/shell/lib/perf_json_output_lint.py b/tools/perf/tests/shell/lib/perf_json_output_lint.py > index b81582a89d36..5e9bd68c83fe 100644 > --- a/tools/perf/tests/shell/lib/perf_json_output_lint.py > +++ b/tools/perf/tests/shell/lib/perf_json_output_lint.py > @@ -55,6 +55,7 @@ def check_json_output(expected_items): > 'interval': lambda x: isfloat(x), > 'metric-unit': lambda x: True, > 'metric-value': lambda x: isfloat(x), > + 'metricgroup': lambda x: True, > 'node': lambda x: True, > 'pcnt-running': lambda x: isfloat(x), > 'socket': lambda x: True, > @@ -70,6 +71,8 @@ def check_json_output(expected_items): > # values and possibly other prefixes like interval, core and > # aggregate-number. > pass > + elif count != expected_items and count >= 1 and count <= 5 and 'metricgroup' in item: > + pass > elif count != expected_items: > raise RuntimeError(f'wrong number of fields. counted {count} expected {expected_items}' > f' in \'{item}\'') > -- > 2.35.1 >
Em Tue, Jun 13, 2023 at 01:17:41PM -0700, Ian Rogers escreveu: > On Wed, Jun 7, 2023 at 9:27 AM <kan.liang@linux.intel.com> wrote: > > > > From: Kan Liang <kan.liang@linux.intel.com> > > > > A new field metricgroup has been added in the perf stat JSON output. > > Support it in the test case. > > > > Signed-off-by: Kan Liang <kan.liang@linux.intel.com> > > Acked-by: Ian Rogers <irogers@google.com> Thanks, applied. - Arnaldo
diff --git a/tools/perf/tests/shell/lib/perf_json_output_lint.py b/tools/perf/tests/shell/lib/perf_json_output_lint.py index b81582a89d36..5e9bd68c83fe 100644 --- a/tools/perf/tests/shell/lib/perf_json_output_lint.py +++ b/tools/perf/tests/shell/lib/perf_json_output_lint.py @@ -55,6 +55,7 @@ def check_json_output(expected_items): 'interval': lambda x: isfloat(x), 'metric-unit': lambda x: True, 'metric-value': lambda x: isfloat(x), + 'metricgroup': lambda x: True, 'node': lambda x: True, 'pcnt-running': lambda x: isfloat(x), 'socket': lambda x: True, @@ -70,6 +71,8 @@ def check_json_output(expected_items): # values and possibly other prefixes like interval, core and # aggregate-number. pass + elif count != expected_items and count >= 1 and count <= 5 and 'metricgroup' in item: + pass elif count != expected_items: raise RuntimeError(f'wrong number of fields. counted {count} expected {expected_items}' f' in \'{item}\'')