X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Flibraries%2Frobot%2Fperformance%2Fperformance_utils.robot;h=52ddc9193ed09095945ef50ed4ce5abb077fff77;hb=401c24914d84058d06ef9b7a4f893662dfeb0dcb;hp=e4454739c007b43a8407b268f83391d1e73dba27;hpb=8840972e7bbc45735f6e82e41ad369728c1b370e;p=csit.git diff --git a/resources/libraries/robot/performance/performance_utils.robot b/resources/libraries/robot/performance/performance_utils.robot index e4454739c0..52ddc9193e 100644 --- a/resources/libraries/robot/performance/performance_utils.robot +++ b/resources/libraries/robot/performance/performance_utils.robot @@ -1,4 +1,4 @@ -# Copyright (c) 2019 Cisco and/or its affiliates. +# Copyright (c) 2020 Cisco and/or its affiliates. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: @@ -34,7 +34,12 @@ | | ... | Fail if a resulting lower bound has too high loss fraction. | | ... | Input rates are understood as uni-directional, | | ... | reported result contains aggregate rates. -| | ... | Currently, the min_rate value is hardcoded to match test teardowns. +| | ... | Additional latency measurements are performed for smaller loads, +| | ... | their results are also displayed. +| | ... | Finally, two measurements for runtime stats are done (not displayed). +| | ... | Currently, the min_rate value is hardcoded to 90kpps, +| | ... | allowing measurement at 10% of the discovered rate +| | ... | without breaking latency streams. | | | | ... | *Test (or broader scope) variables read:* | | ... | - traffic_profile - Name of module defining traffc for measurements. @@ -69,7 +74,7 @@ | | ... | ${latency_duration}=${PERF_TRIAL_LATENCY_DURATION} | | | | ${result} = | Perform optimized ndrpdr search | ${frame_size} -| | ... | ${traffic_profile} | ${10000} | ${max_rate} +| | ... | ${traffic_profile} | ${90000} | ${max_rate} | | ... | ${packet_loss_ratio} | ${final_relative_width} | | ... | ${final_trial_duration} | ${initial_trial_duration} | | ... | ${number_of_intermediate_phases} | timeout=${timeout} @@ -78,40 +83,32 @@ | | Check NDRPDR interval validity | ${result.pdr_interval} | | ... | ${packet_loss_ratio} | | Check NDRPDR interval validity | ${result.ndr_interval} -| | # Rate needs to be high enough for latency streams. -| | ${rate}= | Set Variable | ${9500} -| | Measure and show latency at specified rate | Latency at 0%: -| | ... | ${latency_duration} | ${rate}pps | ${framesize} -| | ... | ${traffic_profile} | ${traffic_directions} +| | ${pdr_sum}= | Set Variable | ${result.pdr_interval.measured_low.target_tr} +| | ${pdr_per_stream}= | Evaluate | ${pdr_sum} / float(${traffic_directions}) | | ${ndr_sum}= | Set Variable | ${result.ndr_interval.measured_low.target_tr} | | ${ndr_per_stream}= | Evaluate | ${ndr_sum} / float(${traffic_directions}) -| | ${rate}= | Evaluate | 0.1 * ${ndr_per_stream} -| | Measure and show latency at specified rate | Latency at 10% NDR: -| | ... | ${latency_duration} | ${rate}pps | ${framesize} -| | ... | ${traffic_profile} | ${traffic_directions} -| | ${rate}= | Evaluate | 0.5 * ${ndr_per_stream} -| | Measure and show latency at specified rate | Latency at 50% NDR: +| | ${rate}= | Evaluate | 0.9 * ${pdr_per_stream} +| | Measure and show latency at specified rate | Latency at 90% PDR: | | ... | ${latency_duration} | ${rate}pps | ${framesize} | | ... | ${traffic_profile} | ${traffic_directions} -| | ${rate}= | Evaluate | 0.9 * ${ndr_per_stream} -| | Measure and show latency at specified rate | Latency at 90% NDR: +| | ${rate}= | Evaluate | 0.5 * ${pdr_per_stream} +| | Measure and show latency at specified rate | Latency at 50% PDR: | | ... | ${latency_duration} | ${rate}pps | ${framesize} | | ... | ${traffic_profile} | ${traffic_directions} -| | ${pdr_sum}= | Set Variable | ${result.pdr_interval.measured_low.target_tr} -| | ${pdr_per_stream}= | Evaluate | ${pdr_sum} / float(${traffic_directions}) | | ${rate}= | Evaluate | 0.1 * ${pdr_per_stream} | | Measure and show latency at specified rate | Latency at 10% PDR: | | ... | ${latency_duration} | ${rate}pps | ${framesize} | | ... | ${traffic_profile} | ${traffic_directions} -| | ${rate}= | Evaluate | 0.5 * ${pdr_per_stream} -| | Measure and show latency at specified rate | Latency at 50% PDR: -| | ... | ${latency_duration} | ${rate}pps | ${framesize} -| | ... | ${traffic_profile} | ${traffic_directions} -| | ${rate}= | Evaluate | 0.9 * ${pdr_per_stream} -| | Measure and show latency at specified rate | Latency at 90% PDR: +| | # Rate needs to be high enough for latency streams. +| | ${rate}= | Set Variable | ${9500} +| | Measure and show latency at specified rate | Latency at 0% PDR: | | ... | ${latency_duration} | ${rate}pps | ${framesize} | | ... | ${traffic_profile} | ${traffic_directions} -| | # Finally, a trial with runtime and other stats. +| | # Finally, trials with runtime and other stats. +| | # We expect NDR and PDR to have different-looking stats. +| | Send traffic at specified rate +| | ... | ${1.0} | ${pdr_per_stream}pps | ${framesize} | ${traffic_profile} +| | ... | traffic_directions=${traffic_directions} | | Send traffic at specified rate | | ... | ${1.0} | ${ndr_per_stream}pps | ${framesize} | ${traffic_profile} | | ... | traffic_directions=${traffic_directions} @@ -162,7 +159,9 @@ | | ... | ${final_trial_duration} | ${initial_trial_duration} | | ... | ${number_of_intermediate_phases} | timeout=${timeout} | | ... | doublings=${doublings} | traffic_directions=${traffic_directions} -| | Return From Keyword | ${result.pdr_interval.measured_low.transmit_rate} +| | Check NDRPDR interval validity | ${result.pdr_interval} +| | ... | ${packet_loss_ratio} +| | Return From Keyword | ${result.pdr_interval.measured_low.target_tr} | Find critical load using PLRsearch | | [Documentation] @@ -279,15 +278,15 @@ | | | | ${frame_size} = | Get Average Frame Size | ${frame_size} | | Display single bound | NDR_LOWER -| | ... | ${result.ndr_interval.measured_low.transmit_rate} | ${frame_size} +| | ... | ${result.ndr_interval.measured_low.target_tr} | ${frame_size} | | ... | ${result.ndr_interval.measured_low.latency} | | Display single bound | NDR_UPPER -| | ... | ${result.ndr_interval.measured_high.transmit_rate} | ${frame_size} +| | ... | ${result.ndr_interval.measured_high.target_tr} | ${frame_size} | | Display single bound | PDR_LOWER -| | ... | ${result.pdr_interval.measured_low.transmit_rate} | ${frame_size} +| | ... | ${result.pdr_interval.measured_low.target_tr} | ${frame_size} | | ... | ${result.pdr_interval.measured_low.latency} | | Display single bound | PDR_UPPER -| | ... | ${result.pdr_interval.measured_high.transmit_rate} | ${frame_size} +| | ... | ${result.pdr_interval.measured_high.target_tr} | ${frame_size} | Display result of soak search | | [Documentation]