Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add timing to each step #720

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

ehelms
Copy link
Member

@ehelms ehelms commented Apr 7, 2023

I think there is value in having this information always to help any reports identify what might be running slowly. I was thinking about this with regard to #719 where it could help us identify places where we could optimize the runtime and reduce downtime.

@ehelms
Copy link
Member Author

ehelms commented Jul 19, 2023

Example output:

Running preparation steps required to run the next scenarios
================================================================================
Check whether system has any non Red Hat repositories (e.g.: EPEL) enabled: 
| Checking repositories enabled on the system                       [OK] [6.02] 
--------------------------------------------------------------------------------


Running Checks before upgrading to Satellite 6.13.z
================================================================================
Clean old Kernel and initramfs files from tftp-boot:                [OK] [2.71]
--------------------------------------------------------------------------------
Check number of fact names in database:                             [OK] [0.06]
--------------------------------------------------------------------------------
Check whether all services are running:                             [OK] [0.52]
--------------------------------------------------------------------------------
Check whether all services are running using the ping call:         [OK] [0.2]
--------------------------------------------------------------------------------
Check for paused tasks:                                             [OK] [0.03]
--------------------------------------------------------------------------------
Check whether system is self-registered or not:                     [OK] [0.0]
--------------------------------------------------------------------------------
Check to make sure root(/) partition has enough space:              [OK] [0.0]
--------------------------------------------------------------------------------
Check to make sure /var/lib/candlepin has enough space:             [OK] [0.0]
--------------------------------------------------------------------------------

@Griffin-Sullivan
Copy link
Contributor

I like the idea. Is this something that you could pass as an option to show the time output? Or do you want this to be default? My main suggestion would be to put the unit of measurement like s for seconds or you could even do the math and put ms if you wanted to. I also think parenthesis might look better but that's not a big deal.

Running preparation steps required to run the next scenarios
================================================================================
Check whether system has any non Red Hat repositories (e.g.: EPEL) enabled: 
| Checking repositories enabled on the system                       [OK] (6.02 s)
--------------------------------------------------------------------------------


Running Checks before upgrading to Satellite 6.13.z
================================================================================
Clean old Kernel and initramfs files from tftp-boot:                [OK] (2.71 s)
--------------------------------------------------------------------------------
Check number of fact names in database:                             [OK] (60 ms)
--------------------------------------------------------------------------------
Check whether all services are running:                             [OK] (520 ms)
--------------------------------------------------------------------------------
Check whether all services are running using the ping call:         [OK] (200 ms)
--------------------------------------------------------------------------------
Check for paused tasks:                                             [OK] (300 ms)
--------------------------------------------------------------------------------
Check whether system is self-registered or not:                     [OK] (0 ms)
--------------------------------------------------------------------------------
Check to make sure root(/) partition has enough space:              [OK] (0 ms)
--------------------------------------------------------------------------------
Check to make sure /var/lib/candlepin has enough space:             [OK] (0 ms)
--------------------------------------------------------------------------------

@lpramuk
Copy link

lpramuk commented Jul 20, 2023

What about omitting times below some threshold , like below 5 sec ? Not interested in timing of quick actions

Only clean package cache when downloading packages
Only clean metadata when cleaning dnf cache
@ehelms
Copy link
Member Author

ehelms commented Feb 6, 2024

Currently contains #793 to get a single Packit build with both for further data gathering.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants