Skip to content

Commit

Permalink
QI: Moving reporting of sync duration to the end of the feature
Browse files Browse the repository at this point in the history
  • Loading branch information
srbarrios committed Nov 11, 2024
1 parent 3746f52 commit b6e20e2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions testsuite/features/reposync/srv_sync_products.feature
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ Feature: Synchronize products in the products page of the Setup Wizard
And I wait until I see "SUSE Linux Enterprise Server 15 SP4 x86_64" product has been added
Then the SLE15 SP4 product should be added
When I wait until all synchronized channels for "sles15-sp4" have finished
And I report the synchronization duration for "sles15-sp4"

@scc_credentials
@uyuni
Expand Down Expand Up @@ -101,7 +100,6 @@ Feature: Synchronize products in the products page of the Setup Wizard
Then the SLE15 SP4 product should be added
When I use spacewalk-common-channel to add channel "sles15-sp4-devel-uyuni-client" with arch "x86_64"
And I wait until all synchronized channels for "sles15-sp4" have finished
And I report the synchronization duration for "sles15-sp4"
# TODO: Refactor the scenarios in order to not require a full synchronization of SLES 15 SP4 product in Uyuni
# When I kill running spacewalk-repo-sync for "sles15-sp4"

Expand Down Expand Up @@ -186,3 +184,7 @@ Feature: Synchronize products in the products page of the Setup Wizard
@scc_credentials
Scenario: Trigger a refresh of the products synched from SCC
When I execute mgr-sync refresh

@scc_credentials
Scenario: Report the synchronization duration for SLES 15 SP4
When I report the synchronization duration for "sles15-sp4"
6 changes: 3 additions & 3 deletions testsuite/features/support/quality_intelligence.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def initialize
# @param time [Integer] the time to complete the bootstrap in seconds
# @return [void]
def push_bootstrap_duration(system, time)
@metrics_collector_handler.push_metrics(QI, 'system_bootstrap_duration_seconds', time, { 'system' => system, 'environment' => @environment })
@metrics_collector_handler.push_metrics(QI, 'system_bootstrap_duration_seconds', time, { :system => system, :environment => @environment })
end

# Report the time to complete the onboarding of a system passed as parameter,
Expand All @@ -30,7 +30,7 @@ def push_bootstrap_duration(system, time)
# @param time [Integer] the time to complete the onboarding in seconds
# @return [void]
def push_onboarding_duration(system, time)
@metrics_collector_handler.push_metrics(QI, 'system_onboarding_duration_seconds', time, { 'system' => system, 'environment' => @environment })
@metrics_collector_handler.push_metrics(QI, 'system_onboarding_duration_seconds', time, { :system => system, :environment => @environment })
end

# Report the time to complete a synchronization of a product passed as parameter,
Expand All @@ -40,6 +40,6 @@ def push_onboarding_duration(system, time)
# @param time [Integer] the time to complete the synchronization in seconds
# @return [void]
def push_synchronization_duration(product, time)
@metrics_collector_handler.push_metrics(QI, 'product_synch_duration_seconds', time, { 'product' => product, 'environment' => @environment })
@metrics_collector_handler.push_metrics(QI, 'product_synch_duration_seconds', time, { :system => product, :environment => @environment })
end
end

0 comments on commit b6e20e2

Please sign in to comment.