Skip to content

Fix line colors in map#19

Merged
cchwala merged 8 commits intomainfrom
fix_line_colors_in_map
Feb 12, 2026
Merged

Fix line colors in map#19
cchwala merged 8 commits intomainfrom
fix_line_colors_in_map

Conversation

@cchwala
Copy link
Member

@cchwala cchwala commented Feb 12, 2026

closes #18 but goes a bit beyond that (some more things were required along the way)

This PR does the following:

  • Performance: Optimize CML map coloring by precalculating statistics in cml_stats table (~2.8s response time vs. 60s+ before)
  • Database: Add cml_stats table and update_cml_stats() function to cache per-CML aggregations; parser updates cache on data insertion
  • API: Refactor /api/cml-stats endpoint to use cached statistics with dynamic 60-minute stddev calculation
  • Fix: Enable Grafana dashboard URL synchronization for CML selection (map clicks now update time series)
  • Testing: Add unit tests for DB writer rollback behavior and API endpoint; fix import-time directory creation to support CI environments

- Optimize CML map coloring performance by precalculating statistics
- Add cml_stats table and update_cml_stats() PostgreSQL function
- Update db_writer.py to maintain stats cache on data insertion
- Modify /api/cml-stats endpoint to use cached stats with dynamic 60min stddev
@codecov
Copy link

codecov bot commented Feb 12, 2026

Codecov Report

❌ Patch coverage is 80.95238% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.40%. Comparing base (9f3bd73) to head (a663359).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
parser/db_writer.py 70.00% 12 Missing ⚠️
webserver/main.py 66.66% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #19      +/-   ##
==========================================
+ Coverage   68.72%   73.40%   +4.68%     
==========================================
  Files          22       22              
  Lines        1848     1914      +66     
==========================================
+ Hits         1270     1405     +135     
+ Misses        578      509      -69     
Flag Coverage Δ
mno_simulator 87.87% <ø> (ø)
parser 81.21% <83.33%> (+0.64%) ⬆️
webserver 44.73% <66.66%> (+15.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cchwala cchwala merged commit 0970bc8 into main Feb 12, 2026
7 checks passed
@cchwala cchwala deleted the fix_line_colors_in_map branch February 12, 2026 17:02
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.

Line coloring in CML map on real-time website does not work anymore

1 participant