[LTP] Duration run time of each benchmark

Chen, Zion zion.chen01@sap.com
Thu Sep 15 15:48:41 CEST 2022


Thanks Andrea we add /usr/bin/time command before calling to each testcase of ltp.

Zion

From: Andrea Cervesato <andrea.cervesato@suse.com>
Sent: Monday, 8 August 2022 15:07
To: Chen, Zion <zion.chen01@sap.com>; ltp@lists.linux.it
Cc: DL CSI Cloud Virtualization DevOps <DL_6093EC116D5E46027E42596D@global.corp.sap>
Subject: Re: [LTP] Duration run time of each benchmark

You don't often get email from andrea.cervesato@suse.com<mailto:andrea.cervesato@suse.com>. Learn why this is important<https://aka.ms/LearnAboutSenderIdentification>
Hi,

Probably the easiest way is to parse stdout and check for TPASS/TFAIL message here (adding a timer somewhere):
https://github.com/acerv/runltp-ng/blob/401f366ccd4bae00a2b247397aae21286594eb5a/ltp/ui.py#L307<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Facerv%2Frunltp-ng%2Fblob%2F401f366ccd4bae00a2b247397aae21286594eb5a%2Fltp%2Fui.py%23L307&data=05%7C01%7Czion.chen01%40sap.com%7Ce8df3a4a3ca544cb179908da79368c50%7C42f7676cf455423c82f6dc2d99791af7%7C0%7C0%7C637955572444548456%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=h2mHKRo8pu%2BzoL%2FJdl3hgdehONJXHkWhXRrO7T1ljy4%3D&reserved=0>

Beware that resulting time is an approximation, since python is running through syscalls and buffering. Also, not all
tests are implemented with latest LTP API, so TPASS/TFAIL messages might not always appear after sub-tests.

Andrea

On 8/8/22 12:44, Chen, Zion wrote:
Hello Andera,

Thanks for your answer, but we need a duration time of a specific TPASS/TFAIL. Do you have something like this?

If not, can you point me to which line in “runltp” I can add “time” linux command to get the duration time of it?

Thanks,
Zion

From: Andrea Cervesato <andrea.cervesato@suse.com><mailto:andrea.cervesato@suse.com>
Sent: Monday, 8 August 2022 12:02
To: Chen, Zion <zion.chen01@sap.com><mailto:zion.chen01@sap.com>; ltp@lists.linux.it<mailto:ltp@lists.linux.it>
Subject: Re: [LTP] Duration run time of each benchmark

You don't often get email from andrea.cervesato@suse.com<mailto:andrea.cervesato@suse.com>. Learn why this is important<https://aka.ms/LearnAboutSenderIdentification>
Hi!

We are currently working on a new LTP runner which is the future replacement of the runltp script written in bash: https://github.com/acerv/runltp-ng<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Facerv%2Frunltp-ng&data=05%7C01%7Czion.chen01%40sap.com%7Ce8df3a4a3ca544cb179908da79368c50%7C42f7676cf455423c82f6dc2d99791af7%7C0%7C0%7C637955572444548456%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=5Mg28F7RBkkjPafOsT%2B1pw9%2BSocaSrPutiPu0HNUT5Q%3D&reserved=0>
The new runner is written in python 3.7+ and it supports duration time between tests. At the moment, it considers execution time of a single test binary,
not the duration time of specific TPASS/TFAIL results as you might expect, also because the old format is still supported and it doesn't give this possibility.

If you don't need to have duration time of specific TPASS/TFAIL , runltp-ng might be the #1 choice for you, since it also implements a JSON report file which
can be parsed easily to obtain the results.

The runltp-ng source code is open and available to everyone, so feel free to help and give any feedback if needed!

Regards,
Andrea

On 8/8/22 10:17, Chen, Zion via ltp wrote:
Hello Linux Test Project

We are in SAP using your ltp benchmark in our linux machine. We are looking in the results file after the run is finish and we want to know the duration time of each sub-test.
Can you point me how to do it? How to find the duration time of each sub-test?

Regards,
Zion









-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20220915/3e7cb6fb/attachment-0001.htm>


More information about the ltp mailing list