aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/robot/performance/performance_vars.robot
diff options
context:
space:
mode:
Diffstat (limited to 'resources/libraries/robot/performance/performance_vars.robot')
-rw-r--r--resources/libraries/robot/performance/performance_vars.robot51
1 files changed, 36 insertions, 15 deletions
diff --git a/resources/libraries/robot/performance/performance_vars.robot b/resources/libraries/robot/performance/performance_vars.robot
index 4a6d385363..9fff489279 100644
--- a/resources/libraries/robot/performance/performance_vars.robot
+++ b/resources/libraries/robot/performance/performance_vars.robot
@@ -60,25 +60,46 @@
| | Return From Keyword If | ${max_rate} | ${max_rate}
| | Fail | \${max_rate} is not defined. Call Set Max Rate And Jumbo keyword.
-| Get Min Rate
+| Get Min Rate Hard
| | [Documentation]
-| | ... | Return a hardcoded value. This is an abstraction, useful in case
-| | ... | we start allowing various other overrides or computations.
-| | ... | Call this just before calling a Python keyword,
-| | ... | as those have restricted access to Robot variables.
-| |
-| | ... | The return value controls the minimal unidirectional packet rate.
-| | ... | The value is also usable for minimal TPS value for ASTF tests.
+| | ... | Return a hardcoded value.
+| | ... | The return value controls the minimal unidirectional packet rate,
+| | ... | to be used anywhere, including latency measurements at 0% load.
| | ... | The current value is the smallest one permitted
| | ... | by STL profiles with latency streams.
| | ... | Return type: float.
| |
| | ... | *Example:*
| |
-| | ... | \| \${min_rate} = \| Get Min Rate \|
+| | ... | \| \${min_rate_hard} = \| Get Min Rate Hard \|
| |
| | Return From Keyword | ${9001.0}
+| Get Min Rate Soft
+| | [Documentation]
+| | ... | If ramp up rate is not defined, return the hard min value.
+| | ... | If ramp up rate is defined (and larger than hard min), return that.
+| | ... | The reason is, ramp up rate should already guarantee no loss.
+| |
+| | ... | The return value controls the minimal unidirectional packet rate,
+| | ... | to be used in various search algorithms.
+| | ... | Latency measurements may want even lower loads, use hard min for that.
+| |
+| | ... | The value is also usable for minimal TPS value for ASTF tests.
+| | ... | Return type: float.
+| |
+| | ... | Currently, undefined ramp up rate is reported as zero,
+| | ... | so we return the maximum of ramp up rate and the hard min rate.
+| |
+| | ... | *Example:*
+| |
+| | ... | \| \${min_rate_soft} = \| Get Min Rate Soft \|
+| |
+| | ${min_rate_hard} = | Get Min Rate Hard
+| | ${ramp_up_rate} = | Get Ramp Up Rate
+| | ${min_rate_soft} = | Evaluate | max(${ramp_up_rate}, ${min_rate_hard})
+| | Return From Keyword | ${min_rate_soft}
+
| Get Mrr Trial Duration
| | [Documentation]
| | ... | Return value from Constants. This is an abstraction, useful in case
@@ -179,7 +200,7 @@
| |
| | ... | The return value determines the required duration of ramp-up phase.
| | ... | Typically used to prepare a specific state on DUT.
-| | ... | If the value is zero, ramp-up phase is skipped.
+| | ... | If the value is zero, ramp-up phase is either skipped or size-limited.
| | ... | Return type: float.
| |
| | ... | *Example:*
@@ -192,12 +213,13 @@
| Get Ramp Up Rate
| | [Documentation]
| | ... | Return value of \${ramp_up_rate},
-| | ... | if not defined return \${max_rate}.
+| | ... | if not defined, return zero.
| |
| | ... | The return value determines the rate for ramp-up phase.
| | ... | Typically used to limit the rate when max rate
| | ... | would lose packets in the ramp up phase, thus not setting
| | ... | the DUT state correctly.
+| | ... | If the value is zero, ramp-up phase should be skipped.
| | ... | Return type: float.
| |
| | ... | *Example:*
@@ -205,13 +227,12 @@
| | ... | \| \${ramp_up_rate} = \| Get Ramp Up Rate \|
| |
| | ${ramp_up_rate} = | Get Variable Value | \${ramp_up_rate} | ${0.0}
-| | Return From Keyword If | ${ramp_up_rate} | ${ramp_up_rate}
-| | Run Keyword And Return | Get Max Rate
+| | Return From Keyword | ${ramp_up_rate}
| Get Rate For Teardown
| | [Documentation]
| | ... | Return value of \${rate_for_teardown},
-| | ... | if not defined (or zero) return the min rate.
+| | ... | if not defined (or zero) return the soft min rate.
| |
| | ... | The return value determines the rate for teardown trial,
| | ... | that is executed if a perf test fails.
@@ -226,7 +247,7 @@
| |
| | ${rate_for_teardown} = | Get Variable Value | \${rate_for_teardown} | ${0.0}
| | Return From Keyword If | ${rate_for_teardown} | ${rate_for_teardown}
-| | Run Keyword And Return | Get Min Rate
+| | Run Keyword And Return | Get Min Rate Soft
| Get Resetter
| | [Documentation]