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

[backend/frontend] Ability to see 100 simulations in the overview of a scenario in 0.5 seconds #1995

Merged
merged 6 commits into from
Dec 12, 2024

Conversation

isselparra
Copy link
Contributor

@isselparra isselparra commented Dec 4, 2024

Proposed changes

  • Display 10 latest simulations results in Scenario Overview Chart
  • Display asynchronously the global score of the list of simulations (scenario overview)

Related issues

Checklist

  • I consider the submitted work as finished
  • I tested the code for its functionality
  • I wrote test cases for the relevant uses case
  • I added/update the relevant documentation (either on github or on notion)
  • Where necessary I refactored code to improve the overall quality

Further comments

Loading times
Data: 100 simulations with 50 injects each

Branch: issue/1911

http://localhost:3001/api/scenarios/2de41219-c7c6-48b3-8edf-e41781efd105/exercises/search
34.11 ms (8.5 times faster)

http://localhost:3001/api/scenarios/2de41219-c7c6-48b3-8edf-e41781efd105/statistics (new)
76.81ms (4.4 times faster)

Branch: release/1.10.0

http://localhost:3001/api/scenarios/2de41219-c7c6-48b3-8edf-e41781efd105/exercises/search
291.62 ms

http://localhost:3001/api/scenarios/2de41219-c7c6-48b3-8edf-e41781efd105/exercises
338.27 ms

Copy link

codecov bot commented Dec 4, 2024

Codecov Report

Attention: Patch coverage is 82.85714% with 24 lines in your changes missing coverage. Please review.

Project coverage is 34.95%. Comparing base (374b4d7) to head (ce1c9de).
Report is 8 commits behind head on release/1.10.0.

Files with missing lines Patch % Lines
...openbas/rest/exercise/service/ExerciseService.java 78.48% 16 Missing and 1 partial ⚠️
...est/scenario/service/ScenarioStatisticService.java 90.56% 2 Missing and 3 partials ⚠️
.../io/openbas/rest/scenario/ScenarioExerciseApi.java 0.00% 1 Missing ⚠️
...io/openbas/rest/scenario/ScenarioStatisticApi.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@                 Coverage Diff                  @@
##             release/1.10.0    #1995      +/-   ##
====================================================
+ Coverage             33.91%   34.95%   +1.04%     
- Complexity             1306     1390      +84     
====================================================
  Files                   524      531       +7     
  Lines                 15823    15947     +124     
  Branches                998     1002       +4     
====================================================
+ Hits                   5366     5574     +208     
+ Misses                10194    10093     -101     
- Partials                263      280      +17     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@isselparra isselparra force-pushed the issue/1911 branch 4 times, most recently from d99a9c7 to 8752c6c Compare December 6, 2024 08:55
@savacano28 savacano28 self-requested a review December 9, 2024 12:27
@isselparra isselparra force-pushed the issue/1911 branch 2 times, most recently from 7cf695e to 5fd5f84 Compare December 10, 2024 10:11
@isselparra isselparra marked this pull request as ready for review December 10, 2024 10:16
- add intermediate record to sort as stream
- sort raw exercises with stream
- fix percentage type
- add tracing in scenario statistics route
- add tests for global scores route and statistics service
- truncate global score success percentage to have only one decimal
- simplify scenario statistics obtention
- update global scores success percentage type
- revert chart colors and use xs loader for async global score
- display custom tooltip on simulations results
- change wording in chart title
- fix display of loading global score icons
- fix loading display of global scores
- display by default scenarios by update date and desc
Copy link
Contributor

@savacano28 savacano28 left a comment

Choose a reason for hiding this comment

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

Tested ok!
Great job!

@isselparra isselparra merged commit 6718bfc into release/1.10.0 Dec 12, 2024
6 checks passed
@isselparra isselparra deleted the issue/1911 branch December 12, 2024 14:51
@savacano28 savacano28 linked an issue Dec 13, 2024 that may be closed by this pull request
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.

"Simulation results" chart in a scenario is not accurate
2 participants