From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web11.1434.1602198959452344246 for ; Thu, 08 Oct 2020 16:15:59 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=x44GYccB; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: ashley.e.desimone@intel.com) IronPort-SDR: ahrfmSlZZtxnFHhxdBpbHNsJ4W6w9ELXKX2ECNml36Y9l40DbGlfgXLklMl74Wfw9eqSfhnYP4 oaZXRF7LbjHw== X-IronPort-AV: E=McAfee;i="6000,8403,9768"; a="145284413" X-IronPort-AV: E=Sophos;i="5.77,352,1596524400"; d="scan'208";a="145284413" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Oct 2020 16:15:56 -0700 IronPort-SDR: 5xKV7LVriaqGN7TYlh9Clxqpit8pHyIbzE4Uj4SkN5XTfHf1awUaAXqtejjSAzmWsS2LlCJta6 OJ6D0FOx8oDw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,352,1596524400"; d="scan'208";a="316853344" Received: from orsmsx604.amr.corp.intel.com ([10.22.229.17]) by orsmga006.jf.intel.com with ESMTP; 08 Oct 2020 16:15:56 -0700 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) 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; Thu, 8 Oct 2020 16:15:55 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 8 Oct 2020 16:15:55 -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; Thu, 8 Oct 2020 16:15:55 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.47) 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; Thu, 8 Oct 2020 16:15:55 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eNojDqt/ynvnWbxeN2GMDtkKeacm6fiXQ6SVWKDUGObzB9ZEmvAtNyFcMYZm1O3fV8dNzzgw8VLiKhKkYCaDIJM6JvmjAT3xs1+3yoZ0Pjbfj4ym22jiBibWtW5pw19zzT+NyiBhifmWlH5L/u8Y7CFzpZKjg0bmCDI01KmmNPc7geTLR9vGXVnL5N4sEOtGDeEJHNaFesr0AUQKSFXjBl5C8qqvuXDmE6JIH11M99Uija1D//Uvt2XkdOMaVRB+wflBGTm/e9DT2l+obFK0Kl0POUW2ZGs02sIvrgMyhe9W7PC7XWgxIIgF/HomgWuKr+xYCAGiY3R92Or1BoST5g== 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=XAJtq0cT/OBaI68nq/UHNCuzQF/XMgPGd26U0PJJJ8g=; b=Z8fDNSaYJhwvO1ay7v+AP9BhrbiPavo5eG1FMdcf3kxYxrkJm9sZSJn0EmLy7Z679HwkUiWDDtka+vOMLcrtAym2xf9FeIVX7vU3xzSSLnAtQp0QCOlnRQJVoNlwibYFGroil4hnoeeh/ERVD8MNxx0oWAntOgyoArT8r8Mg1ebR0YCiDfy2d9L54o7wfz3p38CV4Wkx1lQx+ochd43N74MNMrMXmKzC0yjKxnOD3h/f2ELb4SI1DMjOF061AqINPLosiakd1eoebIUEHa4asfHxThZtyyCXEPTdVC9VuPXVjPOEmOHPYL8rZJ/VCojDwhzOG1sejQXwhIt20Ef7Iw== 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=XAJtq0cT/OBaI68nq/UHNCuzQF/XMgPGd26U0PJJJ8g=; b=x44GYccBF4Yhlyl3ZyST5ZqlVqe3UkoGNls843AQFih6orWfnW3Q+IXgU0IGWFePkU2Nu5Gnne7OCsjGDcdnRBvRgoQL22kFz6nZ5TH6WQYfRAE1EMRn8gpo2rIlpXDXx7YGYw9nVcKVAQWFY9xWb8/+zQYgqj9RJl4LW2DybL0= Received: from BY5PR11MB3973.namprd11.prod.outlook.com (2603:10b6:a03:185::29) by BYAPR11MB3559.namprd11.prod.outlook.com (2603:10b6:a03:f7::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.24; Thu, 8 Oct 2020 23:15:54 +0000 Received: from BY5PR11MB3973.namprd11.prod.outlook.com ([fe80::e467:ac20:6b35:aa8c]) by BY5PR11MB3973.namprd11.prod.outlook.com ([fe80::e467:ac20:6b35:aa8c%5]) with mapi id 15.20.3455.022; Thu, 8 Oct 2020 23:15:54 +0000 From: "Ashley E Desimone" To: "Bjorge, Erik C" , "devel@edk2.groups.io" CC: "Desimone, Nathaniel L" , "Pandya, Puja" , Bret Barkelew , "Agyeman, Prince" Subject: Re: [edk2-staging/EdkRepo] [PATCH v1] EdkRepo: Adding performance option Thread-Topic: [edk2-staging/EdkRepo] [PATCH v1] EdkRepo: Adding performance option Thread-Index: AQHWncj4XJ5/oAT7hUiRdqMjKtzY3g== Date: Thu, 8 Oct 2020 23:15:54 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.5.1.3 dlp-reaction: no-action dlp-product: dlpe-windows 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: c178a789-b7aa-4fc3-2e85-08d86be01b16 x-ms-traffictypediagnostic: BYAPR11MB3559: 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: 3lRRqsAHzrLmcT97hWREweVwbOddYZ0U5G3Xt270RQ98x2o9R1FgUeKqI4yLfz+8aiyhVWFNqtNLWpCwexbXVf09y/CdwfJalY8XIpHMUfhgluacoBmSyGN3AWIkkLpX7alVM8bXiz6hHWTQYnUfcVWtc6xMWB5YdHvoCsC/phfmwt3EwoVHonW0CI4yFctlmCIAsTXZTIQyAvolS1zUWyrhopanSSXe+2JUw7yVkp0JvvqsBrGZb+4TWxpomrWBl1AELfzu2xgQBKrlzYTuknRJl6MGz91X3YHWepwiK9ucyaA485aGc0pxi0QrkUxK8PeOQp7fMymYKWkHdEyO0w== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BY5PR11MB3973.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(376002)(136003)(346002)(396003)(366004)(39860400002)(316002)(54906003)(5660300002)(26005)(110136005)(71200400001)(8676002)(52536014)(7696005)(186003)(4326008)(53546011)(6506007)(107886003)(9686003)(2906002)(478600001)(86362001)(33656002)(76116006)(83380400001)(66446008)(64756008)(66556008)(66476007)(55016002)(66946007)(8936002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: qkIcmY+K/mhjVUhS9/JzbAQTwfVuH/YNC2Wf//YnE22j8TsTo92f2d9bJmr0mYRJ96m/WN+DmZH4fvabv6hSeb0Gj1fvc36J/Vu2VY75ktjyeISuQPKNUSI9hjTjDJO4VrW6+fhzl1PKAEClosa9279U6uM1tgEFWQP6CeUDerJvg6lUT/ZIdl8cur77KNbrHgPO02AjmokCWnAGJH2O3vl7unuPKeGhPKAyy2xH2na0vx2Lc+VxKbaH/KmNl2+S0Z9kgdS24PVP6qYl+x2HhSG1UeSwpy40qmlebY0DX0+YaUUlqk0C/S9VDH60v9n9XKqKcUhCDlfaveJlTBZI/6cqRYI5Dze7/3R2oqRr/0aUUcvY3TicCkFP9W/W56dn+PcLpnm5amUPC0GUdX2CY/AEcX5zjfmUHuo9fcNKgRJ8ShcgSvIMxrs6DJVyUN1CMpw34CnSanOMu4LMQDDuoSx1e6LB59LUx5oj19QxIpTGsoT3icoQd0fpZkh+HW0tYv0JmRt9GIoMyHmfpFPkBigcSowcZ5iVrz6qC4amUncfxSoCYMP+b+qPV6xkL3FicTAL8hJhN4py0SMkCw41PnQ2vRc8P2CvpMknNXXv5dFuifrjMuAP5Zp2kgNT6yMH6CjgSCT0AE1dcAu5dcTo8w== MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BY5PR11MB3973.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c178a789-b7aa-4fc3-2e85-08d86be01b16 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Oct 2020 23:15:54.3070 (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: GhvjrJc3SS3MW6L7evs3v8oG0ZBGZEfyzrqGskRhUeBwwe+DeZ1jB68n5ssZloSv6HwgR0E2FxgqTUkjJ+t4sKiZhpxib1L7tb1c2jWPU6k= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB3559 Return-Path: ashley.e.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: Ashley DeSimone -----Original Message----- From: Erik Bjorge =20 Sent: Monday, October 5, 2020 4:05 PM To: devel@edk2.groups.io Cc: Desimone, Ashley E ; Desimone, Nathaniel L= ; Pandya, Puja ; Br= et Barkelew ; Agyeman, Prince Subject: [edk2-staging/EdkRepo] [PATCH v1] EdkRepo: Adding performance opti= on This new option will display the execution time of a successful command. 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(-) diff --git a/edkrepo/commands/arguments/edkrepo_cmd_args.py b/edkrepo/comma= nds/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 # @@ -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 m= anifest repository" +PERFORMANCE_HELP =3D 'Displays performance timing data for successful comm= ands' diff --git a/edkrepo/commands/composite_command.py b/edkrepo/commands/compo= site_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 # -from edkrepo.commands.edkrepo_command import VerboseArgument +from edkrepo.commands.edkrepo_command import VerboseArgument,=20 +PerformanceArgument + 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 # @@ -54,3 +54,8 @@ SourceManifestRepoArgument =3D {'name' : 'source-manifest= -repo', 'required' : False, 'action' : 'store', 'help-text' : arguments.SOURCE_MANIFEST_REPO_HELP= } + +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 from git.exc import GitCommandError @@ -157,6 +158,7 @@ def generate_command_completion_script(script_filename,= parser): f.write(' complete -F _edkrepo_completions edkrepo\nfi\n') 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() -=20 + start_time)) return 0 if __name__ =3D=3D "__main__": -- 2.21.0.windows.1