From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mx.groups.io with SMTP id smtpd.web12.1269.1601931051120365010 for ; Mon, 05 Oct 2020 13:50:51 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=cBD4MGXe; spf=pass (domain: intel.com, ip: 192.55.52.120, mailfrom: nathaniel.l.desimone@intel.com) IronPort-SDR: jmqzLfX7JNXrRVsclqRBdTHh5Ij0695w5sC0afhvNhTHMRFfz1p2Kx3fytSVHUr0iCqQZkDTXm 2wrkxUwuAG7g== X-IronPort-AV: E=McAfee;i="6000,8403,9765"; a="161430942" X-IronPort-AV: E=Sophos;i="5.77,340,1596524400"; d="scan'208";a="161430942" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP; 05 Oct 2020 13:22:38 -0700 IronPort-SDR: FSzIXONDpAXs+0JWQqYImlx/TESQFKi3YiFXSbMf9pm/d+WnsHerIGyNGzJmdiHqUCSZyp6L/G tMFSXwlIVZJw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,340,1596524400"; d="scan'208";a="327047076" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga002.jf.intel.com with ESMTP; 05 Oct 2020 13:22:38 -0700 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 5 Oct 2020 13:22:19 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Mon, 5 Oct 2020 13:22:19 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.172) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Mon, 5 Oct 2020 13:22:13 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Qlf9v/jm4URUQb9bZzG66pBr2Pn44pdlUkOzKmUURzqWXEPc8MipYKtLyxiHvfHBuGFkeoTqQ7DVPu4JhzX4X+TP14d8rj7gFg/Ih47WyAKemTi1P6fxJUGRa/5dh4G78R9Uf+LK+uuAWMHTXGg+mtDKF6KLw46/bd9po4XrBatv+AsC6lyWOStrp1RS5cHebHbSEG0UUOfIFmLlFEFiNY2FfLnIyMjUeyHW9Dzc9xeXrfCbZunvlfrsJUqwlzWGW3iVg6VRjZJE4RoUXAO9ExtuTzYfMjpUUgM3rQG1/HrsOpYbDr9GIrMM0ZoAfp/oo4pF3lbHBFvT0nVcHmTSRQ== 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=ZVv0bG2JpJOsfQ+Ziylwov6couznCrSSPCV17arn/T0=; b=Rb1WS5Ef/5TO7kkbEUe0/Ri3GyOq8adsaoeEq3oOgxP6OQ3sTTvBPGnlmJd1NmJPfXxDRgioqVV7P2I8V1lKHe1vjmrS6nb3EUDwtkA7zAOmbTIFqyIEv67hyerFbCZm4+7nfhUYl8A56WZkFKhM5ACt+UQ7OzxzqQgVIACS4DhpJnORB0hMmYrVYK14lDm/2aHP7tmw6RrIZu49uF8Pwqx/JSxWy7GfTtjkTsj0GYhh6bprkhZDXqcBHcFMilPK/eJX29gB13YCfphKLxE+HghuzXcyaOmEXzXqoiWNIVypz2Fy8q6YAsZIYg62LreWNvFwKiVZQefnFJ5PpHD8wQ== 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=ZVv0bG2JpJOsfQ+Ziylwov6couznCrSSPCV17arn/T0=; b=cBD4MGXezV++hXT0jG3qqHqh7zlgqQSUHtH5Ckq5cYbDKszcKmZ27QL/LDYc7CqiONfa8PnLSfQ+lGKVxxLKvVyi9GHrp4JLxFj9kLkq9vFQwi7SaYRmeIlmB2uy7R6Jg+ojVqzm6sBymZWYG377F2XSPTds5MavloAaXGrYoms= Received: from MWHPR1101MB2160.namprd11.prod.outlook.com (2603:10b6:301:5b::12) by MWHPR11MB0014.namprd11.prod.outlook.com (2603:10b6:301:64::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3412.28; Mon, 5 Oct 2020 20:22:11 +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.3433.044; Mon, 5 Oct 2020 20:22:11 +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 v1] EdkRepo: Add timing for commands Thread-Topic: [edk2-staging/EdkRepo] [PATCH v1] EdkRepo: Add timing for commands Thread-Index: AQHWmOjXKFikr5ol8UO35RH13OV3p6mEt3OQgAAMeBCABLQOIA== Date: Mon, 5 Oct 2020 20:22:11 +0000 Message-ID: References: <8ae2a21328583856d405bc3d9215e3482dad580d.1601662737.git.erik.c.bjorge@intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZTNhMTgyZDctNTJjYi00YjY2LWE0ZTAtMzg5ZmNjZjMwMDQ1IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiTGwxUEV1VmFBNElBSzFZRTBSdmZuWlJGbUtWQ1MxSFJaU1dBSWI0RFhRWjFoVUpjWk1VRTdaem1FdWtLNWFxRCJ9 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: 8faa8f97-0907-41a2-b277-08d8696c5774 x-ms-traffictypediagnostic: MWHPR11MB0014: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: dIKGL3Sc14h4fCRK7T/Tg0b9zQqRViJk7hxJ4iJA+Iv0cyFZUQKRrOESGUyz7dXSPzq4P7NvnfphcjSPruYzviE8hJsS8o7ouWtVSbWOT7lt7emgUqwqnAZkYPzpIzodOQXOAqlrW39u7MKxqa948ozRLa8K5zjXD9pweNJ0sOb7diu+4SFFQ047xmX9HlEoNCKw3C/XdGHaMSMEQUDICjb+zquKUyCrdLVmkqcqe9vU2MEl2RdCkJQ9KkVeDjeO1g6srreDESdDM9+RFfz79LGzMQmyySTnm3nJyDQj7qG1MRVECnNmYaMCYaj5wqS9wro9K81EytfggFelhk3/lo4U594VMLAD3u2fzPC5F4xeWjr/kKO3vF6iNx4OyjAM 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)(346002)(39860400002)(136003)(376002)(54906003)(110136005)(76116006)(9686003)(66946007)(66476007)(186003)(66556008)(64756008)(8676002)(4326008)(66446008)(71200400001)(55016002)(83380400001)(316002)(2906002)(107886003)(6506007)(5660300002)(478600001)(26005)(8936002)(7696005)(86362001)(33656002)(53546011)(52536014);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: dZMYz5hIB5ve/fRs2R3e+Y8s//CMeV0wFBFdsGM1epOe1D4JgsTPkXL16d8hjASvqULrERVT1xGxpV2yCrrS3ePF2k81rBBF4SRJOY3LoziABsUV/7tuVn+Fqq/PMnZyyDP2VRISTG4v2MGLto+pJqlhSmXi2WxExpgpg7EhRuNS5vi3PaPgCtRJavvZH3/ojJTVULPQrQMhtSPC53C/hps72ypQQR73R7tikheCkVeROeoBeiIsdcPRd1Gilu7XXwNamJaJQiQOKUexLb+ONeAtWj5sHoz9P8E+rPu/vvObfesi/vRH315SFMdG/9fLCV/tBiBwns4VV8YNNcDFJWJrzQHvh9Ho3O4ms8ufOZ+oJoWGuw0dX1VCjozsGIarcF04PqKPSAhlfbphXoGhTCmBhijlfqaifoQmeLhNPHrkLebn9/LaW3/w44ulbPcPQj+tOWuMYZO3cSShF+t7pDu9IMEftZcHhMwpRQQQmmVDZqO2YhyTNQJZFbj6s6xbXKzZvw5F70REvKucsDah8ucjXR392siwtt+3CTL//sCNiwM5ds0UmfpIH+8qnpftyIamvt0Dz1ocAbeCuEE+D7xCZBVOCHATnvFYZeF6PkodhGJwjnZl7NbV4vThxwNtCTG7h6JyZ0pBWpnuDKgLbQ== 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: 8faa8f97-0907-41a2-b277-08d8696c5774 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Oct 2020 20:22:11.5796 (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: fMZnv5A6jPtcDD4vQjSJtfPN53MizXOWs0UauaNBFPmPES13gT2v8xd6Mzmph8O7mDx/OlF5EFRM3L11Ogx4FPpc7FVaT/VrAA3a+b/l1Ns= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB0014 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 Its not a bad idea to move it a little deeper anyway since we have multiple= entry points that make EdkRepo work regardless of whether you are using vi= rtualenv, or -m, or Python launcher for Windows, etc... > -----Original Message----- > From: Bjorge, Erik C > Sent: Friday, October 2, 2020 1:34 PM > To: Desimone, Nathaniel L ; > devel@edk2.groups.io > Cc: Desimone, Ashley E ; Pandya, Puja > ; Bret Barkelew ; > Agyeman, Prince > Subject: RE: [edk2-staging/EdkRepo] [PATCH v1] EdkRepo: Add timing for > commands >=20 > Sure, I can do that but then I would also want to move the timing deeper = into > the code to leverage the existing command line parsing support. It will = not > be quite as accurate but should be fine in general. >=20 > I will make the change and submit V2. >=20 > Thanks, > -Erik >=20 > -----Original Message----- > From: Desimone, Nathaniel L > Sent: Friday, October 2, 2020 12:47 PM > To: Bjorge, Erik C ; devel@edk2.groups.io > Cc: Desimone, Ashley E ; Pandya, Puja > ; Bret Barkelew ; > Agyeman, Prince > Subject: RE: [edk2-staging/EdkRepo] [PATCH v1] EdkRepo: Add timing for > commands >=20 > I don't think we should print execution time every time. Maybe a -- > performance flag or something to that effect? >=20 > > -----Original Message----- > > From: Erik Bjorge > > Sent: Friday, October 2, 2020 11:21 AM > > To: devel@edk2.groups.io > > Cc: Desimone, Ashley E ; Desimone, > > Nathaniel L ; Pandya, Puja > > ; Bret Barkelew > ; > > Agyeman, Prince > > Subject: [edk2-staging/EdkRepo] [PATCH v1] EdkRepo: Add timing for > > commands > > > > Added command timing in the entry point. > > > > 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/edkrepo_entry_point.py | 12 +++++++++--- > > 1 file changed, 9 insertions(+), 3 deletions(-) > > > > diff --git a/edkrepo/edkrepo_entry_point.py > > b/edkrepo/edkrepo_entry_point.py index dd2b36e..e944b7a 100644 > > --- a/edkrepo/edkrepo_entry_point.py > > +++ b/edkrepo/edkrepo_entry_point.py > > @@ -82,8 +82,11 @@ if __name__ =3D=3D "__main__" or > > run_via_launcher_script: > > sys.exit(1) > > > > from edkrepo.config.config_factory import GlobalConfig > > +import datetime as dt > > + > > > > def main(): > > + start =3D dt.datetime.now() > > cfg_file =3D GlobalConfig() > > pref_entry =3D (cfg_file.preferred_entry[0]).replace('.py', '') > > pref_entry_func =3D cfg_file.preferred_entry[1] @@ -91,12 +94,15 @= @ > > def > > main(): > > try: > > mod =3D importlib.import_module(pref_entry) > > func =3D getattr(mod, pref_entry_func) > > - return(func()) > > - except Exception as e: > > + ret_code =3D func() > > + except Exception: > > print('Unable to launch preferred entry point. Launching > > default entry point edkrepo.edkrepo_cli.py') > > traceback.print_exc() > > import edkrepo.edkrepo_cli > > - return edkrepo.edkrepo_cli.main() > > + ret_code =3D edkrepo.edkrepo_cli.main() > > + print('\nExecution Time: {}'.format(dt.datetime.now() - start)) > > + return ret_code > > + > > > > if __name__ =3D=3D "__main__": > > try: > > -- > > 2.21.0.windows.1