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

Fix trends back/ahead result selection logic #132

Merged
merged 10 commits into from
Mar 30, 2021
Merged

Conversation

paulsbruce
Copy link
Collaborator

@paulsbruce paulsbruce commented Mar 10, 2021

What?

Fix the report trends logic to properly calculate back/ahead values

Why?

Because there was a bug that I found during training.

How?

Update report.py :: compile_results_from_source where range should include +1

Testing

Locally, neoload --debug report --filter="results=44f1a611-bad3-451f-a7d5-9534cf62ee26|+1" --type trends --out-file ~/trends.json
Updated expected_trends json and html files for test_report_trends existing tests.

Additional Notes

I have left many logging.debug calls in the code because they are useful in prod scenarios when a customer uses a particular filter on results such as back or ahead numbers, then is confused by which results it [doesn't] pick up. Running in debug mode leaves just enough indicators to understand what the range logic is doing and why it brings back the results it brings back.

Copy link
Collaborator

@guillaumebert guillaumebert left a comment

Choose a reason for hiding this comment

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

I tested with the following command on the environment https://neoload-web.neotys.perfreleng.org/ (default workspace).
The report filter with +3 seems to work, but there is a regression with filter -3 :
With this command : neoload report --type trends --filter results=+4 --template tests\resources\jinja\sample-trends-report.html.j2 --out-file report+2.html d510da5c-ad87-4d69-ad24-256f35296f01
I get these outputs :
CLI regression

@sonarcloud
Copy link

sonarcloud bot commented Mar 11, 2021

@paulsbruce paulsbruce requested review from guillaumebert and removed request for stephanemartin March 11, 2021 21:30
Copy link
Collaborator Author

@paulsbruce paulsbruce left a comment

Choose a reason for hiding this comment

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

Fixed.

@paulsbruce paulsbruce added the bug Something isn't working label Mar 19, 2021
@sonarcloud
Copy link

sonarcloud bot commented Mar 30, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@paulsbruce paulsbruce merged commit f76b5da into master Mar 30, 2021
@paulsbruce paulsbruce deleted the fix-report-trends branch March 30, 2021 19:56
stephanemartin pushed a commit to stephanemartin/neoload-cli that referenced this pull request Apr 15, 2021
* Fix trends back/forward result selection logic

* Add logic to remove duplicates from arr_selected

* Don't add base ID results again, remove dedup logic

* Remove commented out dedup code because Sonar

* Add logic to remove duplicates from arr_selected

* Remove commented debug code; Sonar

* Remove extraneous logging.debug for trends per Guillaume's suggestion

* Fixed debug printout of chosen results list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants