From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web10.1929.1602276486244672491 for ; Fri, 09 Oct 2020 13:48:06 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=YlRpC+tY; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: nathaniel.l.desimone@intel.com) IronPort-SDR: rL/SZDjqkA4O+wq/B2oGnZZtTR9afmH2nAC3NrZDqNg54/EHHcgaoes/r+cmzax0NRBJjiM9Ks 5oov6WBzT1QA== X-IronPort-AV: E=McAfee;i="6000,8403,9769"; a="164748437" X-IronPort-AV: E=Sophos;i="5.77,356,1596524400"; d="scan'208";a="164748437" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Oct 2020 13:48:05 -0700 IronPort-SDR: eQ5+XQKPhAMXORIpDZ5gDZVH215Mxohzzs2OQXIBcsYm1p2LIHm17QQ26jXcldL+9kNfvkR5fE FEDADfgD4Kig== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,356,1596524400"; d="scan'208";a="519859521" Received: from orsmsx604.amr.corp.intel.com ([10.22.229.17]) by fmsmga005.fm.intel.com with ESMTP; 09 Oct 2020 13:48:05 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 9 Oct 2020 13:48:05 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 9 Oct 2020 13:48:05 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Fri, 9 Oct 2020 13:48:04 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.100) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Fri, 9 Oct 2020 13:48:02 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ag/WZ4iFC0lDgNxrDTZRq7ci5ns0HLf23zdez/bYHCP6pGE6JLs9Swagqw/A7H49M/mMqVwe+wmwtgcVn0jup1KjBozocMV2SuMZTddDJO1sX6y+LZdpt6tHuV0xPpUW1Nz/VXdXllKoMjgUkNcTmmFPgB6C5JNzqxVZiJxdO9w3kIECqXDPgnWsl72hdLjwDlfJEzQf96jnKoFhIBgXz436lLBohX0jPW+dsToVkCqXmlliCjpGxewwj5pZaMOuCzZtWoXJ+GbEGYsjkImMEeSVxs08RLCH9U6lAD7xjRGmCnyVGaxc5K2Dy1pHLHPzqFy41Kt3FZksYTXByCw8tA== 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-SenderADCheck; bh=Kaq4qAZv5KR4Xry4sPOS5Qve7j62Co70nzoWF4HtATo=; b=kxdHLf1lMpHMsoJN3FqmBV3DMmYLN2fTWFzUz3yfjd1SU36YqOvfSg6ZjvOj/1Cu8b4aCl4DUlOxVzZQ1iwZ5ufZVlfy3zsoWr+La/KOPlK5chYThu3ajiC+24riMcomgKy6Coy0TsnhuGBEaWmY8jObQhwcXgg9TaA9g9kI5Nt7N4Wgwxa7OOJEj0w70Yun5FAUvkqiTFQQp4IUVVGS20vYiJOXRWpj9SekVYi8KdyBc+q2FlKsz4uy9ksggyrpxPXH+sFfAmzN0/e8DGlbTinrSIbRfapAPv8d253kQjfEbs7N4j6wmWoZho4RiPMEYmohsHmtIYeHn+if/hSD9Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Kaq4qAZv5KR4Xry4sPOS5Qve7j62Co70nzoWF4HtATo=; b=YlRpC+tYDVpJpPjWqYIPeUQXwJ9ewf4fCjxZmy1aJrjd9jaVHWjgXo1IjG8AP3DnIA3OfQFm0y4KckeMnfPRKwcy1v2+QvsLE8xv3xLGB7btsyKL190C2/6WU6bpFl/XiPQ5qeALPBHUvnmTNys7c3Br0pqWcHALa0yTruJy928= Received: from MWHPR1101MB2160.namprd11.prod.outlook.com (2603:10b6:301:5b::12) by MWHPR1101MB2255.namprd11.prod.outlook.com (2603:10b6:301:5b::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.22; Fri, 9 Oct 2020 20:48:01 +0000 Received: from MWHPR1101MB2160.namprd11.prod.outlook.com ([fe80::75c9:81e9:2646:791c]) by MWHPR1101MB2160.namprd11.prod.outlook.com ([fe80::75c9:81e9:2646:791c%4]) with mapi id 15.20.3455.026; Fri, 9 Oct 2020 20:48:01 +0000 From: "Nate DeSimone" To: "Bjorge, Erik C" , "devel@edk2.groups.io" CC: "Desimone, Ashley E" , "Pandya, Puja" , Bret Barkelew , "Agyeman, Prince" Subject: Re: [edk2-staging/EdkRepo] [PATCH v2] EdkRepo: Adding performance option Thread-Topic: [edk2-staging/EdkRepo] [PATCH v2] EdkRepo: Adding performance option Thread-Index: AQHWm3IE81lPDcmgtUOEiyzcZppZ4amPw+2g Date: Fri, 9 Oct 2020 20:48:01 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiM2FhZTFmYzYtNGM4OS00MTVmLTg0NjUtYzUxZWY5M2NlZWQ1IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiVDIyMkJLMFwvRzZVRmt4ODQ0Z0VQMTZjeFh0RXVNaFg4M2psQk1uYUpMb1wvMXREbUtyXC9vbGprU0MwNmhKVEFRbiJ9 dlp-reaction: no-action dlp-version: 11.5.1.3 dlp-product: dlpe-windows x-ctpclassification: CTP_NT authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [50.53.190.176] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: be8d1132-6906-46e9-9a13-08d86c949ccc x-ms-traffictypediagnostic: MWHPR1101MB2255: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:773; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: dSo2VT/ouelIJMTB6EVbxGkM1c35kf8pp6Z2XXzQ5kuH9f2DgaTzEZSiaOvgrVmp4dmlGeEg+PtQWyB8sXQJDiXnppPTJ1d6lsFbNuepjD0xUE+JFvtST8egdgxB+mZXI1x79vk5Sf0p0Pw9w5q7UOn+DeXiAhYuMSBpRlNwXwPs9yYhT6Ohn7c5vGuQ/JvHKbte1XZ/Mkp1eBV8ExqqHwDDJPpu5hoTASzyT/03bKPmfUCr+cYfq4RVFB3ODXLtmUKuKWGpqfoBn7ILFfgNrl7XCyGXpbtUTGhk2bim8ojhco4mPZ3wqL54KbKx+nk7x3gdwc41F63PC6c4V0yXnORtjjStj+t9vMNc+FVtE8tsu4X5CSFFVcdoshMOAA3pMGgw9SKD863GmisQ05p0RA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR1101MB2160.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(39860400002)(136003)(396003)(346002)(376002)(71200400001)(52536014)(5660300002)(110136005)(478600001)(2906002)(186003)(66946007)(66446008)(76116006)(66556008)(26005)(316002)(64756008)(966005)(66476007)(33656002)(83080400001)(7696005)(54906003)(8676002)(6506007)(86362001)(107886003)(8936002)(55016002)(83380400001)(53546011)(9686003)(4326008);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: cPj6tG5rkDTVZUbRmEix5z7eVAbNVnTATo1bI8lRLVAkNjbd9O55rEDMQJZzDnQWN6ANopWtH1FCeCGgTzhJuIzNmJaHk6lUio/+73t7fLGeVJzLtJsqVn4eyBcgIU/5EtHwiHrdYksyayOou1BtUKAUD5NvY9P4zynbmtN+WZfDZr72UB3dbcGdI0y0P1Wcx8T/pqQfQRblLCA5fofjJ1cr8J9tFXJ9phOPPDe4ge1irzuIlS2MbOIfBE0Hma9yFcWHcIw4qrVT+o1zT5L3zMkeO+wa+2JvIwm8CQH8ES3c9l3QwFmImhc0Td7TbLCc8vyBxHEplHAsyIrbuCUNhok9NR4H2WFJ6pEEPApQHBVXjeCbRn8KdcQyQAP36AeG+BHE6ExicO/bweSesJ3P+QbKMtJijJOITogQa+6RfSsRRDcksucUtofKq+EAtopM8EQ/FhqA88vAbt0uLohurcx5lMbFYglF6jAIpZTNYzb3kRzvB7GPQ9Ckvq1s5lmqdUtXRUdN3d9S/MMx/4KFq0HbeksbU6wmOs8x2oBFqaceHEc/FX1NSGCUM8A5JM6MHcvicA/OiJREsiFc4Y9ah1HYbLt+C7tjlBCcI3rYrxxcM5DP+aOTZR9K8zSMnDHTZw+XYPlI78iKPiJwtcAW4A== MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MWHPR1101MB2160.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: be8d1132-6906-46e9-9a13-08d86c949ccc X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Oct 2020 20:48:01.3849 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: UOyM6Li/ITbaZ73reYvroMyv3dZmRodw3MUGTGua2VGhxnw6DiuJZHIhxFyeYVB8Z6us7OVfLChhvj5KT7DE4CuLd2X3L3eeECMugrGGIYs= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR1101MB2255 Return-Path: nathaniel.l.desimone@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Pushed: https://github.com/tianocore/edk2-staging/commit/51eed87 > -----Original Message----- > From: Erik Bjorge > Sent: Monday, October 5, 2020 2:55 PM > To: devel@edk2.groups.io > Cc: Desimone, Ashley E ; Desimone, > Nathaniel L ; Pandya, Puja > ; Bret Barkelew ; > Agyeman, Prince > Subject: [edk2-staging/EdkRepo] [PATCH v2] EdkRepo: Adding performance > option >=20 > This new option will display the execution time of a successful command. >=20 > Cc: Ashley E Desimone > Cc: Nate DeSimone > Cc: Puja Pandya > Cc: Bret Barkelew > Cc: Prince Agyeman > Cc: Erik Bjorge > Signed-off-by: Erik Bjorge > --- > edkrepo/commands/arguments/edkrepo_cmd_args.py | 3 ++- > edkrepo/commands/composite_command.py | 4 +++- > edkrepo/commands/edkrepo_command.py | 7 ++++++- > edkrepo/edkrepo_cli.py | 4 ++++ > 4 files changed, 15 insertions(+), 3 deletions(-) >=20 > diff --git a/edkrepo/commands/arguments/edkrepo_cmd_args.py > b/edkrepo/commands/arguments/edkrepo_cmd_args.py > index e8a6138..2fab8c1 100644 > --- a/edkrepo/commands/arguments/edkrepo_cmd_args.py > +++ b/edkrepo/commands/arguments/edkrepo_cmd_args.py > @@ -3,7 +3,7 @@ > ## @file > # argument_strings.py > # > -# Copyright (c) 2017- 2019, Intel Corporation. All rights reserved.
> +# Copyright (c) 2017- 2020, Intel Corporation. All rights reserved.
> # SPDX-License-Identifier: BSD-2-Clause-Patent # >=20 > @@ -17,3 +17,4 @@ OVERRIDE_HELP =3D 'Ignore warnings' > SUBMODULE_SKIP_HELP =3D 'Skip the pull or sync of any submodules.' > COLOR_HELP =3D 'Force color output (useful with \'less -r\')' > SOURCE_MANIFEST_REPO_HELP =3D "The name of the workspace's source > global manifest repository" > +PERFORMANCE_HELP =3D 'Displays performance timing data for successful > commands' > diff --git a/edkrepo/commands/composite_command.py > b/edkrepo/commands/composite_command.py > index ff53d3b..72cb029 100644 > --- a/edkrepo/commands/composite_command.py > +++ b/edkrepo/commands/composite_command.py > @@ -7,7 +7,8 @@ > # SPDX-License-Identifier: BSD-2-Clause-Patent # >=20 > -from edkrepo.commands.edkrepo_command import VerboseArgument > +from edkrepo.commands.edkrepo_command import VerboseArgument, > +PerformanceArgument > + >=20 > class CompositeCommand(object): > def __init__(self): > @@ -21,6 +22,7 @@ class CompositeCommand(object): > if command.get_metadata()['name'] =3D=3D command_name: > metadata =3D command.get_metadata() > args =3D metadata['arguments'] > + args.append(PerformanceArgument) > args.append(VerboseArgument) > metadata['arguments'] =3D args > return metadata > diff --git a/edkrepo/commands/edkrepo_command.py > b/edkrepo/commands/edkrepo_command.py > index edd29a9..320dd9c 100644 > --- a/edkrepo/commands/edkrepo_command.py > +++ b/edkrepo/commands/edkrepo_command.py > @@ -3,7 +3,7 @@ > ## @file > # edkrepo_command.py > # > -# Copyright (c) 2017- 2019, Intel Corporation. All rights reserved.
> +# Copyright (c) 2017- 2020, Intel Corporation. All rights reserved.
> # SPDX-License-Identifier: BSD-2-Clause-Patent # >=20 > @@ -54,3 +54,8 @@ SourceManifestRepoArgument =3D {'name' : 'source- > manifest-repo', > 'required' : False, > 'action' : 'store', > 'help-text' : arguments.SOURCE_MANIFEST_REPO_HE= LP} > + > +PerformanceArgument =3D {'name': 'performance', > + 'positional': False, > + 'required': False, > + 'help-text': arguments.PERFORMANCE_HELP} > diff --git a/edkrepo/edkrepo_cli.py b/edkrepo/edkrepo_cli.py index > 03061c9..4e7ff16 100644 > --- a/edkrepo/edkrepo_cli.py > +++ b/edkrepo/edkrepo_cli.py > @@ -20,6 +20,7 @@ import site > import inspect > import imp > import importlib.util > +import datetime as dt >=20 > from git.exc import GitCommandError >=20 > @@ -157,6 +158,7 @@ def > generate_command_completion_script(script_filename, parser): > f.write(' complete -F _edkrepo_completions edkrepo\nfi\n') >=20 > def main(): > + start_time =3D dt.datetime.now() > command =3D command_factory.create_composite_command() > config =3D {} > try: > @@ -207,6 +209,8 @@ def main(): > traceback.print_exc() > print("Error: {}".format(str(e))) > return 1 > + if parsed_args.performance: > + print('\nExecution Time: {}'.format(dt.datetime.now() - > + start_time)) > return 0 >=20 > if __name__ =3D=3D "__main__": > -- > 2.21.0.windows.1