X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Frobot%2Fperformance%2Fperformance_display.robot;h=aaf5be819086517fe6919ea68318878d7e7ba63b;hp=c34fddaa7bc369b66f66fa9f44d4cb517b3bfb46;hb=39d7a8edcc62e8a96ce0e06e1e3fa64cce345d16;hpb=b6fbffad32515ccf94404680cb5280c2cb561af5 diff --git a/resources/libraries/robot/performance/performance_display.robot b/resources/libraries/robot/performance/performance_display.robot index c34fddaa7b..aaf5be8190 100644 --- a/resources/libraries/robot/performance/performance_display.robot +++ b/resources/libraries/robot/performance/performance_display.robot @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Cisco and/or its affiliates. +# Copyright (c) 2022 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: @@ -36,7 +36,7 @@ | | ${lower_bound} = | Set Variable | ${interval.measured_low} | | ${lower_bound_lr} = | Set Variable | ${lower_bound.loss_ratio} | | Return From Keyword If | ${lower_bound_lr} <= ${packet_loss_ratio} -| | Set Test Variable | \${rate_for_teardown} | ${lower_bound_lr} +| | Set Test Variable | \${rate_for_teardown} | ${lower_bound.target_tr} | | ${message}= | Catenate | SEPARATOR=${SPACE} | | ... | Minimal rate loss ratio ${lower_bound_lr} | | ... | does not reach target ${packet_loss_ratio}. @@ -46,6 +46,31 @@ | | ... | ${message}${\n}${message_zero} | ${message}${\n}${message_other} | | Fail | ${message} +| Compute Bandwidth +| | [Documentation] +| | ... | Compute (bidir) bandwidth from given (unidir) transaction rate. +| | ... +| | ... | This keyword reads \${ppta} and \${avg_aggregated_frame_size} set +| | ... | elsewhere. The implementation should work for both pps and cps rates. +| | ... | +| | ... | *Arguments:* +| | ... | - tps - Transaction rate (unidirectional) [tps]. Type: float +| | ... +| | ... | *Returns:* +| | ... | - Computed bandwidth in Gbps. +| | ... | - Computed aggregated packet rate in pps. +| | +| | ... | *Example:* +| | +| | ... | |\ \${bandwidth} \| \${pps} = \| Compute Bandwidth \| \${12345.67} \| +| | +| | [Arguments] | ${tps} +| | +| | ${ppta} = | Get Packets Per Transaction Aggregated +| | ${pps} = | Evaluate | ${tps} * ${ppta} +| | ${bandwidth} = | Evaluate | ${pps} * (${avg_aggregated_frame_size}+20)*8/1e9 +| | Return From Keyword | ${bandwidth} | ${pps} + | Display Reconfig Test Message | | [Documentation] | | ... | Display the number of packets lost (bidirectionally) @@ -71,7 +96,7 @@ | Display result of NDRPDR search | | [Documentation] | | ... | Display result of NDR+PDR search, both quantities, both bounds, -| | ... | aggregate in units given by trasaction type, e.g. by default +| | ... | aggregated, in units given by trasaction type, e.g. by default | | ... | in packet per seconds and Gbps total bandwidth | | ... | (for initial packet size). | | ... | @@ -90,7 +115,7 @@ | | ... | - transaction_type - String identifier to determine how to count | | ... | transactions. Default is "packet". | | ... | *Arguments:* -| | ... | - result - Measured result data. Aggregate rate, tps or pps. +| | ... | - result - Measured result data. Aggregated rate, tps or pps. | | ... | Type: NdrPdrResult | | | | ... | *Example:* @@ -150,7 +175,7 @@ | | ... | it is in transactions per second. Bidirectional traffic | | ... | transaction is understood as having 2 packets, for this purpose. | | ... | -| | ... | Pps values are aggregate in packet per seconds, +| | ... | Pps values are aggregated, in packet per seconds | | ... | and Gbps total bandwidth (for initial packet size). | | ... | | | ... | Througput is calculated as: @@ -176,10 +201,10 @@ | | | | ${transaction_type} = | Get Transaction Type | | Run Keyword And Return If | """_cps""" in """${transaction_type}""" -| | ... | Display single cps bound | ${text} | ${tps} | ${latency} -| | Display single pps bound | ${text} | ${tps} | ${latency} +| | ... | Display Single CPS Bound | ${text} | ${tps} | ${latency} +| | Display Single PPS Bound | ${text} | ${tps} | ${latency} -| Display single cps bound +| Display Single CPS Bound | | [Documentation] | | ... | Display one bound of NDR+PDR search for CPS tests. | | ... | The bounds are expressed as transactions per second. @@ -192,20 +217,22 @@ | | | | ... | *Example:* | | -| | ... | \| Display single cps bound \| NDR lower bound \| \${12345.67} \ +| | ... | \| Display Single CPS Bound \| NDR lower bound \| \${12345.67} \ | | ... | \| latency=\${EMPTY} \| | | | | [Arguments] | ${text} | ${tps} | ${latency}=${EMPTY} | | | | Set Test Message | ${\n}${text}: ${tps} CPS | append=yes +| | ${bandwidth} | ${pps} = | Compute Bandwidth | ${tps} +| | Export Search Bound | ${text} | ${tps} | cps | ${bandwidth} | | Return From Keyword If | not """${latency}""" | | Set Test Message | ${\n}LATENCY [min/avg/max/hdrh] per stream: ${latency} | | ... | append=yes -| Display single pps bound +| Display Single PPS Bound | | [Documentation] -| | ... | Display one pps bound of NDR+PDR search, -| | ... | aggregate in packet per seconds and Gbps total bandwidth +| | ... | Display one pps bound of NDR+PDR search, aggregated, +| | ... | in packet per seconds and Gbps total bandwidth | | ... | (for initial packet size). | | ... | | | ... | The bound to display is given as target transfer rate, it is assumed @@ -225,16 +252,15 @@ | | | | ... | *Example:* | | -| | ... | \| Display single pps bound \| NDR lower bound \| \${12345.67} \ +| | ... | \| Display Single PPS Bound \| NDR lower bound \| \${12345.67} \ | | ... | \| latency=\${EMPTY} \| | | | | [Arguments] | ${text} | ${tps} | ${latency}=${EMPTY} | | -| | ${ppta} = | Get Packets Per Transaction Aggregated -| | ${pps} = | Evaluate | ${tps} * ${ppta} -| | ${bandwidth} = | Evaluate | ${pps} * (${avg_frame_size}+20)*8 / 1e9 +| | ${bandwidth} | ${pps} = | Compute Bandwidth | ${tps} | | Set Test Message | ${\n}${text}: ${pps} pps, | append=yes | | Set Test Message | ${bandwidth} Gbps (initial) | append=yes +| | Export Search Bound | ${text} | ${pps} | pps | ${bandwidth * 1e9} | | Return From Keyword If | not """${latency}""" | | Set Test Message | ${\n}LATENCY [min/avg/max/hdrh] per stream: ${latency} | | ... | append=yes