Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add handling for ZeroDivisionError #76

Merged
merged 2 commits into from
Mar 19, 2024

Conversation

nathan-weinberg
Copy link
Contributor

Type of change

  • Refactor
  • New feature
  • Bug fix
  • Optimization
  • Documentation Update

Description

Currently Touchstone can't handle comparing values where the divisor is 0 due to ZeroDivisionError

This change basically allows that data to be viewed as part of the comparison even though we can't calculate an actual percentage change - defaults to Pass and 0.00% - example is shown below

Checklist before requesting a review

  • I have performed a self-review of my code.
  • If it is a core feature, I have added thorough tests.

Testing

(venv) [nathan@nathan-redhat benchmark-comparison (zerodiv)]$ touchstone_compare -vv --database elasticsearch -url https://$ES_USERNAME:$ES_PASSWORD@search-ocp-qe-perf-scale-test-elk-hcm7wtsqpxy7xogbu72bor4uve.us-east-1.es.amazonaws.com:443 --uuid 0c6cdb12-ad06-4b4a-8fa2-fb2b92fdf7ff c9a81e65-64e9-4cb1-84e9-8f0792913882 --config=netobserv_touchstone_tolerancy_config.json --tolerancy-rules netobserv_touchstone_tolerancy_rules.yaml 2> /dev/null | egrep -iB 3 -A 1 "Pass|fail"
egrep: warning: egrep is obsolescent; using grep -E
+-----------------------+-----------------------+------------+--------+-----------+--------------------------------------+--------------------------------------+
|      metric_name      |      metric_name      |   metric   | result | deviation | 0c6cdb12-ad06-4b4a-8fa2-fb2b92fdf7ff | c9a81e65-64e9-4cb1-84e9-8f0792913882 |
+-----------------------+-----------------------+------------+--------+-----------+--------------------------------------+--------------------------------------+
| nFlowsProcessedTotals | nFlowsProcessedTotals | max(value) |  Fail  |  -75.49%  |              27288832.0              |              6688675.0               |
+-----------------------+-----------------------+------------+--------+-----------+--------------------------------------+--------------------------------------+
+--------------------------------+--------------------------------+------------+--------+-----------+--------------------------------------+--------------------------------------+
|          metric_name           |          metric_name           |   metric   | result | deviation | 0c6cdb12-ad06-4b4a-8fa2-fb2b92fdf7ff | c9a81e65-64e9-4cb1-84e9-8f0792913882 |
+--------------------------------+--------------------------------+------------+--------+-----------+--------------------------------------+--------------------------------------+
| nFlowsProcessedPerMinuteTotals | nFlowsProcessedPerMinuteTotals | avg(value) |  Pass  |   2.75%   |          404844.96458333335          |           415993.42578125            |
+--------------------------------+--------------------------------+------------+--------+-----------+--------------------------------------+--------------------------------------+
+---------------------+---------------------+------------+--------+-----------+--------------------------------------+--------------------------------------+
|     metric_name     |     metric_name     |   metric   | result | deviation | 0c6cdb12-ad06-4b4a-8fa2-fb2b92fdf7ff | c9a81e65-64e9-4cb1-84e9-8f0792913882 |
+---------------------+---------------------+------------+--------+-----------+--------------------------------------+--------------------------------------+
| nFlowsErroredTotals | nFlowsErroredTotals | max(value) |  Pass  |   0.00%   |                 0.0                  |                 0.0                  |
+---------------------+---------------------+------------+--------+-----------+--------------------------------------+--------------------------------------+
+------------------------------+------------------------------+------------+--------+-----------+--------------------------------------+--------------------------------------+
|         metric_name          |         metric_name          |   metric   | result | deviation | 0c6cdb12-ad06-4b4a-8fa2-fb2b92fdf7ff | c9a81e65-64e9-4cb1-84e9-8f0792913882 |
+------------------------------+------------------------------+------------+--------+-----------+--------------------------------------+--------------------------------------+
| nFlowsErroredPerMinuteTotals | nFlowsErroredPerMinuteTotals | avg(value) |  Pass  |   0.00%   |                 0.0                  |                 0.0                  |
+------------------------------+------------------------------+------------+--------+-----------+--------------------------------------+--------------------------------------+
+--------------------+--------------------+------------+--------+-----------+--------------------------------------+--------------------------------------+
|    metric_name     |    metric_name     |   metric   | result | deviation | 0c6cdb12-ad06-4b4a-8fa2-fb2b92fdf7ff | c9a81e65-64e9-4cb1-84e9-8f0792913882 |
+--------------------+--------------------+------------+--------+-----------+--------------------------------------+--------------------------------------+
| lokiRecordsWritten | lokiRecordsWritten | max(value) |  Pass  |  -75.49%  |              27281852.0              |              6686261.0               |
+--------------------+--------------------+------------+--------+-----------+--------------------------------------+--------------------------------------+
+--------------+--------------+------------+--------+-----------+--------------------------------------+--------------------------------------+
| metric_name  | metric_name  |   metric   | result | deviation | 0c6cdb12-ad06-4b4a-8fa2-fb2b92fdf7ff | c9a81e65-64e9-4cb1-84e9-8f0792913882 |
+--------------+--------------+------------+--------+-----------+--------------------------------------+--------------------------------------+
| cpuFLPTotals | cpuFLPTotals | avg(value) |  Pass  |   0.71%   |          1.6973307073116302          |          1.7093896083533764          |
+--------------+--------------+------------+--------+-----------+--------------------------------------+--------------------------------------+
+---------------+---------------+------------+--------+-----------+--------------------------------------+--------------------------------------+
|  metric_name  |  metric_name  |   metric   | result | deviation | 0c6cdb12-ad06-4b4a-8fa2-fb2b92fdf7ff | c9a81e65-64e9-4cb1-84e9-8f0792913882 |
+---------------+---------------+------------+--------+-----------+--------------------------------------+--------------------------------------+
| cpuEBPFTotals | cpuEBPFTotals | avg(value) |  Pass  |  -1.20%   |          1.9241856733957927          |          1.901170140132308           |
+---------------+---------------+------------+--------+-----------+--------------------------------------+--------------------------------------+
+---------------+---------------+------------+--------+-----------+--------------------------------------+--------------------------------------+
|  metric_name  |  metric_name  |   metric   | result | deviation | 0c6cdb12-ad06-4b4a-8fa2-fb2b92fdf7ff | c9a81e65-64e9-4cb1-84e9-8f0792913882 |
+---------------+---------------+------------+--------+-----------+--------------------------------------+--------------------------------------+
| cpuLokiTotals | cpuLokiTotals | avg(value) |  Pass  |  -13.34%  |          0.400474754969279           |         0.34703495912253857          |
+---------------+---------------+------------+--------+-----------+--------------------------------------+--------------------------------------+
+----------------+----------------+------------+--------+-----------+--------------------------------------+--------------------------------------+
|  metric_name   |  metric_name   |   metric   | result | deviation | 0c6cdb12-ad06-4b4a-8fa2-fb2b92fdf7ff | c9a81e65-64e9-4cb1-84e9-8f0792913882 |
+----------------+----------------+------------+--------+-----------+--------------------------------------+--------------------------------------+
| cpuKafkaTotals | cpuKafkaTotals | avg(value) |  Pass  |  50.36%   |         0.12678426404794058          |         0.19063538499176502          |
+----------------+----------------+------------+--------+-----------+--------------------------------------+--------------------------------------+
+--------------+--------------+------------+--------+-----------+--------------------------------------+--------------------------------------+
| metric_name  | metric_name  |   metric   | result | deviation | 0c6cdb12-ad06-4b4a-8fa2-fb2b92fdf7ff | c9a81e65-64e9-4cb1-84e9-8f0792913882 |
+--------------+--------------+------------+--------+-----------+--------------------------------------+--------------------------------------+
| rssFLPTotals | rssFLPTotals | avg(value) |  Pass  |  -19.46%  |             1345875968.0             |             1083939840.0             |
+--------------+--------------+------------+--------+-----------+--------------------------------------+--------------------------------------+
+---------------+---------------+------------+--------+-----------+--------------------------------------+--------------------------------------+
|  metric_name  |  metric_name  |   metric   | result | deviation | 0c6cdb12-ad06-4b4a-8fa2-fb2b92fdf7ff | c9a81e65-64e9-4cb1-84e9-8f0792913882 |
+---------------+---------------+------------+--------+-----------+--------------------------------------+--------------------------------------+
| rssEBPFTotals | rssEBPFTotals | avg(value) |  Pass  |  -21.83%  |          2234848324.266667           |             1746938368.0             |
+---------------+---------------+------------+--------+-----------+--------------------------------------+--------------------------------------+
+---------------+---------------+------------+--------+-----------+--------------------------------------+--------------------------------------+
|  metric_name  |  metric_name  |   metric   | result | deviation | 0c6cdb12-ad06-4b4a-8fa2-fb2b92fdf7ff | c9a81e65-64e9-4cb1-84e9-8f0792913882 |
+---------------+---------------+------------+--------+-----------+--------------------------------------+--------------------------------------+
| rssLokiTotals | rssLokiTotals | avg(value) |  Pass  |  -56.21%  |            16757993472.0             |             7338251776.0             |
+---------------+---------------+------------+--------+-----------+--------------------------------------+--------------------------------------+
+----------------+----------------+------------+--------+-----------+--------------------------------------+--------------------------------------+
|  metric_name   |  metric_name   |   metric   | result | deviation | 0c6cdb12-ad06-4b4a-8fa2-fb2b92fdf7ff | c9a81e65-64e9-4cb1-84e9-8f0792913882 |
+----------------+----------------+------------+--------+-----------+--------------------------------------+--------------------------------------+
| rssKafkaTotals | rssKafkaTotals | avg(value) |  Pass  |  -28.33%  |          5287129361.066667           |             3789225216.0             |
+----------------+----------------+------------+--------+-----------+--------------------------------------+--------------------------------------+

@nathan-weinberg
Copy link
Contributor Author

Copy link
Member

@jtaleric jtaleric left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm @paigerube14 / QE team who might still use touchstone as much of us in perfscale are not.

Copy link
Contributor

@paigerube14 paigerube14 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@jtaleric jtaleric merged commit e069f59 into cloud-bulldozer:master Mar 19, 2024
1 check failed
@nathan-weinberg nathan-weinberg deleted the zerodiv branch March 20, 2024 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants