aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/robot/performance/performance_utils.robot
AgeCommit message (Collapse)AuthorFilesLines
2020-07-09Framework: Allow change of MRR settingspmikus1-24/+39
Signed-off-by: pmikus <pmikus@cisco.com> Change-Id: Ie88f0df239725a4de62d727e1923cdb3ad040809
2020-04-27Performance: TRex approximatedDuration and approximateRatePeter Mikus1-2/+6
- API to provide duration for send and receive traffic Signed-off-by: Peter Mikus <pmikus@cisco.com> Change-Id: Id186a200be66b7703348e6fd3099ffd405e915ae
2020-01-29Display target_tr for ndr/pdr resultsVratko Polak1-5/+5
Small differences in Tx packet counts can cause the previous way (which used transmit_rate, computed from packets sent and nominal duration) to report lower bounds as higher than upper bounds. Also, reconf tests need the target (not actual) rate. Change-Id: If5222dabd9762b8d9c2e22d875c12ad355bc6838 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2020-01-29Ndrpdr: Remove unused latency measurementsVratko Polak1-23/+14
+ Improve keyword Documentation. + Reorder measurements, higher loads first. Change-Id: I1aeab1c8ada268422e9f421e075aff2ac9eec23f Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2020-01-28Check interval validity in reconf testsVratko Polak1-0/+2
Without this, if the search part returns min_rate, then reconf part reports few seconds with a small loss count. But min_rate means there is a bug or misconfiguration, so the tests should fail, instead of returning misleading results. Change-Id: I566608b40ae11d6aaa3fe022a32da97901e1999c Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2020-01-27Increase min_rate for NDRPDR testsVratko Polak1-2/+4
Latency measurements break for loads less than 9 kpps per direction. Setting min_rate to 90 kpps prevents 10% latency trial from breaking. 90 kpps should be enough for any type of test. When some test finds a lower value, this patch will make the fail with a message saying the loss rate at minimal load is too high (instead of a cryptic error from 10% measurement without this patch). Change-Id: I97b8428aa5044da23343b86447857b3a101f6baa Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2020-01-27Restore PDR stat run for NDRPDRVratko Polak1-2/+6
Before [0], the NDRPDR test ended with two measurements that perform runtime stats collection, each 2 seconds long. [0] then decreased that duration to one second, and removed the PDR measurement. This change re-adds the PDR measurement, while keeping the duration at 1 second. [0] https://gerrit.fd.io/r/c/csit/+/24427 Change-Id: I76828f11863a9e278cdd0cf60f2792d5b614ce43 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2020-01-21Ndrpdr: Add latency trials for smaller loadsVratko Polak1-11/+78
Change-Id: I46bd4b58bdd02a3deed38c158214e1e9977dde05 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2019-12-18python3: fix RF 'only continuation marker' warningDave Wallace1-5/+5
Change-Id: I250ffd196045bc623d5d38f30f16a08bcaea137c Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-12-17Telemetry: Add more operational dataPeter Mikus1-108/+31
+ Add both NDR and PDR telemetry capture + Speedup sockets + Adjust privileges Signed-off-by: Peter Mikus <pmikus@cisco.com> Change-Id: Ia6fd5d405e6fb410651d8b705c921653753aea10
2019-11-28Python3: resources and librariesJan Gelety1-89/+90
Change-Id: I1392c06b1d64f62b141d24c0d42a8e36913b15e2 Signed-off-by: Jan Gelety <jgelety@cisco.com>
2019-09-24Add support for HDRhistogramVratko Polak1-1/+1
+ Enable hdrh in trex server. + Append hdrh coded output after min/avg/max/. + Read (not show nor decode) hdrh value in PAL. + Also, remove old ndrpdrdisc code. Change-Id: I99d99f10386a621772b5419ca1f36080fa15aca7 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2019-09-24Reconf tests: Fix async measurementsVratko Polak1-3/+8
TRex does not zero the server counters. It copies the values to use as reference, and subtracts them when asked for results. But the reference is stored in the client (not the server). And CSIT uses different scripts to start and stop async traffic, which means different clients. This patch introduces a workaround. Async start will return xstats objects to use as reference, and async stop will use the objects to compute the correct results. The xstats objects are stored in TrafficGenerator instance. Sync measurement does not export the counters, to shorten logs. Other improvements: + Make stop_traffic_on_tg return measurement results directly. + Rename --async to --async_start as "async" is reserved in Python 3.7 + Minor pylint, docstring and typo fixes. Change-Id: I5fc56a0763afb7d62cfa7c0651f96b6867de3e15 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2019-09-12Support unidirection in all searchesVratko Polak1-61/+84
+ Rename bool unidirection to int traffic_directions. + Rename "untagged" to "initial" for bandwidth calculation. + Fix latency measurement for unidirectional traffic. + Remove duplicate colon in soak test message. + Edit PAL to accept both forms. + Fix minor documentation issues. Change-Id: I6c76f2dc090ae493f2fbd7e9ccd45229d2306dea Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2019-09-10Refactor getting telemetryPeter Mikus1-3/+4
+ Ability to get stats from CNF via SocketPAPI - Remove obsolete functions Signed-off-by: Peter Mikus <pmikus@cisco.com> Change-Id: I4d1b32a7279244592be96644e4f8a530c4f29a15
2019-09-06Read environment variables in Constants.pyVratko Polak1-2/+3
Instead of using EnsureGlobalVariable, which is clunky to use from Python. As a consequence, all caps variables from Constants.py are used directly and tests/__init__.robot and robot_enhancements.robot are deleted. + Rename the CRC global kill switch based on ci-man review. Change-Id: I10723792475bc83352bf8c3b7f7946ecf885a194 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2019-08-23Introduce reconfig suites, for dot1q+ip4+vxlanVratko Polak1-12/+131
Ticket: CSIT-1551 + Config copied from other suites. + Layer keywords prepared for additional chains. + Renamed "create" argument to "vlan_per_chain". + TrafficGenerator result extraction improvements. + Also unified TG type and subtype checking. + Throughput estimated as PDR for zero PLR. + Actual Qemu start is skipped. + Parse xstats instead of stats in trex stop scipt. - Because stats are unconditionally cleared on each script connect. + Remember start values to get better ReceiveMeasurementResult at stop. + Expose loss count and time as appropriate test message. + Autogen support. + Multiple chain amounts and core densities. - Only 1 additional chain. + Proper TAGs. Documented. + Clarified min framesize tags are for TG-DUT. + Added a TODO concerning overhead values. + Added 118B tag. + Robot performance keywords improvements. + Added missing return value documentation. + Frame size as required test variable, not an explicit argument. + MLRsearch keyword to store result (not into test message). - TODO: De-duplicate: main keyword to measure, minor to set test message. - But implementation uses the fact default arguments are different. + Keywords for starting and stopping background traffic. - No checks whether start-stop pair is complete. + Multiple minor indentation and logging improvements. - Missing / TODOs: - Support also vlan_per_chain=True? - Support dot1q without vxlan? - Support also deletion? - How to package config steps so -reconf can be generated from -ndrpdr? Change-Id: If0270697f9ffa837c34ef802917220a53f156703 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2019-08-23Improve PLRsearch yet againVratko Polak1-1/+1
Logic improvements for rls1908 and post-pylint fixes: + Reduce search time to 30 minutes. + Use average instead alternating loads. + Rework log/exp avg/stdev from two estimates. + Introduce and use pessimistic variance of dual trackers. + Introduce safe_exp to use when None does not skip code. + Use dot relative imports (instead of disabling pylint). + Complete docstrings for simpler functions. + Append docstrings to named tuples. + Somewhat unify docstrings related to the same arguments. + Slightly improve intentation. + State named tuples as rtype where used. + Add returns and rtype to __repr__ where missing. + Return what docstring say (or update them). + Explicit copying for vector and matrix values. Change-Id: I884c68b4839c5df5e8bef95e463666599603a0ff Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2019-08-12Clean: Various librariesPeter Mikus1-12/+3
- Remove translate TC as they have no perf opposite - Remove unused keywords - Merge similar keywords / rename - Move keywords from perf library to categories Signed-off-by: Peter Mikus <pmikus@cisco.com> Change-Id: I6433006136e2497ad8fb17193aa20c578d836999
2019-07-05Remove pkt_trace as global variablePeter Mikus1-2/+3
- Use explicit parameters Change-Id: I21cbc8cf13ec5e455b20c685c4427a53a655f71f Signed-off-by: Peter Mikus <pmikus@cisco.com>
2019-06-19Add continue/fail option for enable tracesTibor Frank1-1/+1
Change-Id: I675f9664391c9f18f312773812f765f345983cc1 Signed-off-by: Tibor Frank <tifrank@cisco.com>
2019-05-10PLRsearch: Use stat trackers to shorten IntegratorVratko Polak1-2/+2
+ Extract several tracker classes and use them in Integrator. + Apply next_rate workarounds to focus more on critical region. + Rewrite stretch function, as the previous implementation was wrong. + Rework logging: ++ Use injected trace() function in Integrator. ++ Inject function that skips trace logging on default initialization. ++ Use the same multiprocessing-safe passing, but separate queue. + Set duration to 120m in Robot, but keep at 30m in Python. + Apply minor changes to make computations more reproducible: ++ Attempt to log everything needed by reproducibility in one line. ++ Log samples used, and make it settable as upper limit. ++ Use repr output in TRex scripts, to avoid rounding when copypasting. +- Numpy seems to be sharing PRNG between processes. +-- An edit to disable one thread is needed for full reproducibility. +-- Such an edit is prepared, but will not be merged anytime soon. Change-Id: Icf56429b34ab6de2d18a12e6c676e2d242b3ba4c Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2019-05-10FIX: Missing show run data in NDRPDRPeter Mikus1-0/+27
Change-Id: If4b013ef4bf4bc8f857913f3847ab3b2e2aa5a5d Signed-off-by: Peter Mikus <pmikus@cisco.com>
2019-04-26NF density tests with dtc=0.5 and dtcr=2Peter Mikus1-53/+0
Change-Id: Icff556142280ad0b6261e0a2bfb71672ee6b3807 Signed-off-by: Peter Mikus <pmikus@cisco.com>
2019-04-17Clean up traffic_profile vs osi_layerVratko Polak1-15/+21
The two types were not well distinguished before. Error introduced in: https://gerrit.fd.io/r/#/c/17811/84/resources/libraries/robot/performance/performance_setup.robot@255 Error hotfixed in: https://gerrit.fd.io/r/#/c/18847/4/resources/libraries/robot/shared/default.robot@109 + Rename some arguments and improve method docstrings. Newly introduced argument name osi_layer should be dissimilar enough. Change-Id: Ie0f6f97dc010fc6477f09c54574970f1d15462e2 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2019-04-08Upgrade autogen to NICs and search typesVratko Polak1-202/+78
+ All perf suites updated, as autogen change is backward incompatible. + Only x710 -ndrpdr suites remain in git repository. + Removed retry feature of run_tests. + Renamed topology_type and traffic_type to traffic_profile. + Renamed framesize to frame_size; nic_model to nic_name. + Reordered Variables table to start with nic_name and overhead. + Fixed wrong overhead value in some cbc-sha1 suites. + Fixed some suite tags. ++ Introduced tags to distinguish suites, such as IPSECINT. + Bound crypto hardware to NIC name. + Implemented NIC limit hiding. + Also search and teardown related arguments are now hidden. + Main measurement keywords updated to new arg handling. + Max rate related keywords moved to performance_limits.robot + Teardowns unified. + Generated tests are archived. ++ Generated directory is .gitignore-d. + Regenerator raises an exception on seeing non-compatible suite. ++ Relatively helpful message should be seen in exception. + Suite and template Documentation has generated parts. +- With short NIC names only. + Autogen checker also upgraded. + Tag expressions replaced with long files to ensure analogous tests. Change-Id: I60e9a999187e7da1f60d0eb4fb02afa14682aa46 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2019-03-18CSIT-1386 KernelVM - Part IPeter Mikus1-1/+0
- Refactor QemuUtils Full refactor of QemuUtils to prepare for thinner VMs. Change-Id: I171ba11a9e6e9faec582bd58df6819598b0ed0b5 Signed-off-by: Peter Mikus <pmikus@cisco.com>
2019-02-18Remove unused performance util keywordsVratko Polak1-71/+25
+ Added some TODOs. + Get Frame Size updates: ++ Renamed to Get Average Frame Size. ++ Called by Get Max Rate And Jumbo. ++ Moved to the top. Change-Id: I149831b630d4c0ae098f7189f2231b72c6fb7668 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2019-02-12Fix argument order in unidirection related KWsVratko Polak1-17/+20
The original unidirection Chhange [0] has changed the order, breaking some call sites. Also, use different indentation to save some vertical space. [0] https://gerrit.fd.io/r/#/c/16696/3/resources/libraries/python/TrafficGenerator.py@551 Change-Id: Ife9bd994da73f0afcd24fc16794f822a831c4353 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2019-01-29PLRsearch: Initial implementation and suitesVratko Polak1-2/+73
Missing bits: - Add up-to-date .rst document (in child Change). - Prepare for releasing to PyPI.org (in child Change): -- Either copy dependencies from MLRsearch, or list in requirements. -- Perhaps move common dependencies to separate package for both search to depend on. -- All the other metadata stuff. Jira: CSIT-1276 Change-Id: I277efdb63dbb90b30e11f4e30a82e2130ac8efc3 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2019-01-08[V4] Add sending unidirectional traffic support for TG in CSITYulong Pei1-7/+24
Extend TG in CSIT to support to send unidirectional traffic, and then it can be used by unidirectional test cases e.g. Load balancer. Change-Id: Ie25bcdf7d4525a6d88d8ecd11a1b6d98275fa4d6 Signed-off-by: Yulong Pei <yulong.pei@intel.com>
2019-01-08CSIT-1387 Implement mapping functionPeter Mikus1-0/+51
Implement universal mapping function for placing the NF threads to cpu cores/threads. - Must be SMT aware. - Must work with N-core NF. - Must be DUT (vswtich) aware. - Must be deterministic. - Must use DTCR and MTCR parameters. Change-Id: I98b61861f85c5af7ecd856719b4adf2ba95c262f Signed-off-by: Peter Mikus <pmikus@cisco.com>
2018-12-11Delete old NDR/PDR keywordsVratko Polak1-376/+0
Change-Id: I932d46646408a030ffdeb78b3a3e19c39455750d Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2018-10-02CSIT-1326 VLIB: barrier sync elog tracingPeter Mikus1-1/+1
- API changed. Change-Id: If70e1a930aa14b129ad38ef544cff32ad5a08cdd Signed-off-by: Peter Mikus <pmikus@cisco.com>
2018-10-01CSIT-1326 Add barrier event tracesPeter Mikus1-0/+4
Change-Id: I0f734c2f11cc89716371554880f1d7404ea16090 Signed-off-by: Peter Mikus <pmikus@cisco.com>
2018-08-22CSIT-1222: Do two doublings in external MLRsearchVratko Polak1-2/+4
Make number of doublings configurable, keep Python default at 1, set Robot default to 2. Also make docstring types unique (pylint was complaining about classes and modules having the same name). Increase MLRsearch version to 0.2.0. Change-Id: Ib846032e79ff52994503c0cfef2f86655502c275 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2018-07-24CSIT-1097: Edit dpdk suites for new rate and jumboVratko Polak1-2/+5
Change-Id: If2fceb47639dc1add32184271c1e911f7920a51a Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2018-07-17CSIT-1186: Add srv6 NDRPDR suitesVratko Polak1-18/+114
Delete the corresponding ndrpdrdisc suites. MRR suites are also edited, to make them less different from NDRPDR suites. Now, there is a script to re-generate testcases of selected suites. For that, resources/libraries/python/autogen is created, with Regenerator holding the most of script logic. The script looks at files matching a glob expression, reuses a "prolog", but overwites test cases with the default template and hardcoded set of testcase arguments. Also, handling of overhead size has been simplified, using new keyword Get Max Rate And Jumbo And Handle Multi Seg. Default value for search timeout is increased to 12 minutes to make timeout failures less frequent. Change-Id: I394ad61f262b3078e5ca719034b15ada48987ee0 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2018-07-11CSIT-1178: Prepare for bursty MRRVratko Polak1-42/+32
+ All suites and tests still refer to MRR instead of BMRR (or FRMOBL). + API change: Traffic should pass with maximum rate first argument got a default value, thus it needs to be moved towards the end of argument list. + Consequently, the value for it has been deleted from suites. + Test message is now compatible only with BMRR parsing. - Reporting of transmit rate is left as TODO. + Global test __init__ with new way of giving defaults to global variables. + The new keyword is put into robot_enhancements.robot resource. + Number of trials and trial duration are now configurable. - Bootstrap scripts have no support for overriding the defaults yet. Change-Id: I4b108cc9c256730e62c03fbacba0a1c314f8ae88 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2018-05-16CSIT-992: Fix intermediate phases MDR parameterVratko Polak1-6/+6
Also add TODOs and improve comments. Change-Id: I50bd652c83c272c3f7662dd487ab617be2b7de08 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2018-05-10CSIT-992: Give MDR parameters official namesVratko Polak1-15/+16
Change-Id: I1da9a64fb06e015f2b2a0aacb46a53d70349b4b6 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2018-05-10CSIT-1071 Add traffic evaluation criteria to MRRPeter Mikus1-1/+3
- Fail the testcase if there is no traffic pass. Change-Id: I162187073aafa286793ce488fda9fd065bb55213 Signed-off-by: Peter Mikus <pmikus@cisco.com>
2018-05-04CSIT-992: Shorten MDR search test messageVratko Polak1-9/+6
Change-Id: I79c78d4d8ca1611a287bd117e480c4317d27e287 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2018-05-04CSIT-992: Add libraries for optimized searchVratko Polak1-0/+161
+ Place the libraries into resources/libraries/python/search/. + Except OptimizedTrexSearch in TrafficGenerator.py + Change traffic generator to support floats for duration and warmup. + Remove explicit type conversions where not needed. + Add robot keywords to performance_utils.robot + for calling the optimized search. + for reporting the resulting values. + for checking the minimal performance has been reached. + for running five second "Traffic should pass with no loss" after the search. - Add methodology documentation in subsequent Change. - Add simulator for testing algorithm correctness in a subsequent Change. - Add tests using the libraries in subsequent Change. Change-Id: Ia041008382ee4c9a562172099aea794c854d5f2f Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2018-04-23CSIT-1009: SRv6 proxy testsJan Gelety1-1/+1
- SRv6 with endpoint to SR-unaware Service Function via static proxy - SRv6 with endpoint to SR-unaware Service Function via dynamic proxy - SRv6 with endpoint to SR-unaware Service Function via masquerading proxy Change-Id: I6a6062cb41d810bf9e27dacfd866181bfde4c693 Signed-off-by: Jan Gelety <jgelety@cisco.com>
2018-04-11Cleanup perf bootstrapPeter Mikus1-16/+6
- Remove the DPDK_TEST variable and replace it by internal global variable - Unify all perf boostrap for merge in future. - Cleanup ligato perf bootstrap. Change-Id: Id47d6614c8dd18a701493e00056ef17d2e37fc5c Signed-off-by: Peter Mikus <pmikus@cisco.com>
2018-03-21CSIT-998: MRR testsJan Gelety1-2/+1
- CSIT-1001: MRR tests: IP4 - ip4 - 10ge2p1x520-ethip4-ip4base-copwhtlistbase-mrr.robot - 10ge2p1x520-ethip4-ip4base-iacldstbase-mrr.robot - 10ge2p1x520-ethip4-ip4base-ipolicemarkbase-mrr.robot - 10ge2p1x520-ethip4-ip4scale200k-mrr.robot - 10ge2p1x520-ethip4-ip4scale20k-mrr.robot - 10ge2p1x520-ethip4-ip4scale2m-mrr.robot - 10ge2p1x520-ethip4udp-ip4base-iacl1sf-10kflows-mrr.robot - 10ge2p1x520-ethip4udp-ip4base-iacl1sl-10kflows-mrr.robot - 10ge2p1x520-ethip4udp-ip4base-iacl50sf-10kflows-mrr.robot - 10ge2p1x520-ethip4udp-ip4base-iacl50sl-10kflows-mrr.robot - 10ge2p1x520-ethip4udp-ip4base-nat44-mrr.robot - 10ge2p1x520-ethip4udp-ip4scale1000-udpsrcscale15-nat44-mrr.robot - 40ge2p1xl710-ethip4-ip4base-mrr.robot - ip4_tunnels - 10ge2p1x520-ethip4vxlan-l2bdbasemaclrn-mrr.robot - 10ge2p1x520-ethip4vxlan-l2xcbase-mrr.robot - 10ge2p1x520-ethip4lispip4-ip4base-mrr.robot Change-Id: Ibfd03aea9b97d29a8fa05e2956f6df54603a2208 Signed-off-by: Jan Gelety <jgelety@cisco.com>
2018-02-27Performance KW optimizationsPeter Mikus1-3/+0
- Reducing test time by removing redundant KW. Change-Id: I03eeb0332cb88a11eff06df6f5e79d905df317a2 Signed-off-by: Peter Mikus <pmikus@cisco.com>
2018-02-23Raw results chk keywords and initial TCPeter Mikus1-20/+79
- Implementation of Display raw results - Implementation of Traffic should pass with maximum rate - Code optimizations - L2BD, L2XC, IP4, IP6 TC Change-Id: I0b50e995a853ed3c8f88323ccc650e47b8ed2496 Signed-off-by: Peter Mikus <pmikus@cisco.com>
2018-01-17CSIT-675: SRv6 performance testsJan Gelety1-11/+20
- update L1 KWs - update L2 KWs - tests with one SID (no SRH insertion) - tests with two SIDs (SRH inserted) and decapsulation - tests with two SIDs (SRH inserted) without decapsulation - enabled packet traces and logged packet traces in the test case tear down if test failed Change-Id: I3a0f4c350eed3f42509c6d49e832faa78fe64dbb Signed-off-by: Jan Gelety <jgelety@cisco.com>