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.web12.1640.1602275959566478535 for ; Fri, 09 Oct 2020 13:39:19 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=RFoDOnPV; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: nathaniel.l.desimone@intel.com) IronPort-SDR: 5uZgwZK5MsJerMgm4DkbM8yVPzBUlSZTAWdRuR2fcEe2zPjHT6QKsy+tmPVy3/Dlng6ciWR3Jc QYFH3Na/b0Mw== X-IronPort-AV: E=McAfee;i="6000,8403,9769"; a="164747828" X-IronPort-AV: E=Sophos;i="5.77,355,1596524400"; d="scan'208";a="164747828" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Oct 2020 13:39:19 -0700 IronPort-SDR: PzqF6uoEOlP7TQ0zQuF1seqMIM16gyYrnUFcTHC9KQGzpdeF3Mrgoar8byC5WRiZcC05ZDG23m 2aJakqXwB6rg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,356,1596524400"; d="scan'208";a="298430224" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmsmga007.fm.intel.com with ESMTP; 09 Oct 2020 13:39:19 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx603.amr.corp.intel.com (10.18.126.83) 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:39:18 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx612.amr.corp.intel.com (10.18.126.92) 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:39:18 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx603.amr.corp.intel.com (10.18.126.83) 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:39:18 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.173) by edgegateway.intel.com (192.55.55.71) 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:39:17 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OycIzOWtle84JfYt7ngbjWzFbeHXb2VzVukv3EHJv4mYxthy0sK9pLy+oUCzrt3lvj+Bgp7H1GDt0TAV01D+w4OFYnwRjfDextLmnBfeLNWcytVubXNSFnUEDTy98VIHAeG1xHf4c0Vhu3kJPRoaIlBgqFw2rVhmhMuHkL1lsTa3pN+Qp8WkUEvHM3RJ6YG4VEf1iLpgZiii1akkAAf/EaPHG6OHIvK0PiOeC+XgRWco+tryd3Pb5thf0PqG0eUGL9waCoeaoQIF/LqHYgCysHCZc7vm31EIITDT9WRJzajud7doMfUtcR/9nnkciNnlRtgqytO3SDjXwydpyAV3Tg== 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=Kz0EpIU1O9T56lZdL4ybkT6yp+PNdOf2dw3OVdrdKu0=; b=gVy1CenrWLbIVReXuvqhdzceY2Z5nX5uCxWzFMcVaO1dWv0hS/+dF22TR8b1JtAsW5dUVB0pZtbYFMNNTHjhl5sXEYAQwRsweSp8A+MF1pqddUibE1afIZpyo5ot8WIBg+w+VwnTYBe+IsFFVzHvSwj9m7/qmVJp+idWo8JdwwyoKycNVFjt/KuM5VJPsV5L3OdwEOjDwqvEAV6vN247RsthtdI8S6NksJY2mushxnNFVrZnifil1I8i6rT0sLhU5fvs3oS9b1TSgAZzkUMCISSuam4zt3grPSPV/smVL5rcH+dMrVFtkMPeM/wa70o40fVTDQ8Uv0GUS6D2hF+Sww== 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=Kz0EpIU1O9T56lZdL4ybkT6yp+PNdOf2dw3OVdrdKu0=; b=RFoDOnPVXM9Px8CG5u/XN3s8KGcVsKcvMBewXMYVnhn/K4bLNwN3yUJ82L9hY2M/Yy6TsO4KygYjjiuTNmyxrYnf74BU6zDFAqAooFnZQg2qUn7U6ix5T7GZko5BMBOqPQcY6iw8L2vHnFGZRkii8RtcpdKzSlPqi6p0S+o/iaI= Received: from MWHPR1101MB2160.namprd11.prod.outlook.com (2603:10b6:301:5b::12) by MWHPR11MB1245.namprd11.prod.outlook.com (2603:10b6:300:28::11) 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:39:16 +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:39:16 +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: AQHWm3IE81lPDcmgtUOEiyzcZppZ4amPwYbA Date: Fri, 9 Oct 2020 20:39:16 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNmMyNDMwMjMtNTM5OC00YzYxLWE1N2MtNmYxNTk5NmExMzEwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiK01QVWJhQkdCa1hHRHJsSWtQR3FsUHRyQytWcTBPMGZnK2dGMUE0RUlNc3AwSk9maHNCWWNINjRHSEVUNjZiOCJ9 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: f8887b7b-1487-407d-0e5e-08d86c936413 x-ms-traffictypediagnostic: MWHPR11MB1245: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6430; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: yVH4PV1EEjBydsl/RkNfFRi/00hpJl9K3BIgitFefnCVa3PoK5ltbyi/86cuZZW6L8OndfNi28zP4kfVVkBh8V9KN3FUyDYy617CGoCMeqnvrJNWypr9JA+0YZg/JfzsJLOOBhI1OeryGrPr8rQ/5QDWpe1gOQ4Lj3EjZ72/7Dwg5ifeuh3AvV5FHwFeUl6r2N4PGMaUtbgelS26DAAzBNIQ++/RjASsaYPj8Q0UovKPseolUtwna02rpUXQeRewTXN9w/axdjcbJuw7y+8kP9uqdAGRIn7z9c+ZP8ytmuzGa+wtUzghGTESkoLiWX11psdEgE5J2shNhvwsCPyDnw== 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)(396003)(366004)(39860400002)(376002)(136003)(346002)(33656002)(4326008)(53546011)(2906002)(26005)(83380400001)(71200400001)(186003)(86362001)(52536014)(8676002)(7696005)(478600001)(66446008)(66476007)(107886003)(6506007)(76116006)(110136005)(316002)(8936002)(64756008)(5660300002)(9686003)(54906003)(66946007)(66556008)(55016002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: I0v5A5CGKUvJu3ncqV2yeBIM1+STTx8Cr9QV0DtcTOH2wlYtoieUpGk+wKYkeJ4MCLUB6AfGKLZYQ9392iBbCm3WDVW9VBofHrHvYkthmO1CSfEnKexI+ZvifgUloMRcv+HmitfKulE10rOU9uAzMK6E5cI+b1YNO74VEGGh6ywOoKXzUZomuFZktXdR8+NjbnFAKCLmTH+ihv16qQHhQbI9b1NH8HWd6W+G7e/Ou43OWIN+ApGrc1XmJxfWNscUhRquyHRj0LssCAasOt9AfmaoNeY0JZzm6+ppwuVq7URbULYXzwEfchAji8S3eYC7SugG/87pIvJoxn2Ba1uHRHeAU/50rH/wLHCiN8ycybYKfrHSTPUD2qRtUaMHeO/X7xkDEVVUFmbTuQIE/jX3GEplYPylNYs1PU7CPk/PfAAT1HqYKs3m59uWnqFkjRqCAgk1nBLxUFMAN6ukNM1QStJb8/EtTo655Qjqaw2K7ZqLuNo9Hqff9P0wHr+D8M2EtKC3NbgK9NVK8FX04M9pYVem6wjHRXvKSUzxyl/hoHQ5E0jhplp6VMK46cIOY913RDA2B6MBSx5uwNVFvZ5U9isJ9d/ji+hrfOe4iUGGF4O+3pXbM8FRMmgDnH/bcfIOjIzozWQKuFyfh2NjFflDRw== 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: f8887b7b-1487-407d-0e5e-08d86c936413 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Oct 2020 20:39:16.7228 (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: S1MoaeHSAJQyy9x5NXjvjANNmXmVDnDLs4sG1089gX9T280/m85BbaihgTMRY37OHVx7Fr8TubRVh8jkXpLwmtE4DieaNvv7ZwOVHcMTB54= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1245 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 Reviewed-by: Nate DeSimone > -----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