-
Notifications
You must be signed in to change notification settings - Fork 13
Dashboard_helper Refactor
The dashboard_helper makes queries to determine the number of measurements within a time segment, for each instrument. It is an expensive query because the measurement counts are grouped according to time identifier. This process is repeated three times, to get group counts by minute, hour and day.
The original dashboard_helper submitted a query for each individual instrument. If there were say 5 instruments, this created 15 queries. The code was refactored so that the same information was collected for all instruments, reducing the number of queries down to a constant 3.
This table presents the results, which were scraped from the Rails log. The log conveniently provides a summary of the total time, the time spent evaluating the view, and the time spent in the database access, for rendering of a page.
All times are in seconds, for the new method and the old method. You can see that the savings come from the database ActiveRecord access.
Portal Name | Samples | New Total Time | Old Total Time | New Views Time | Old Views Time | New AR Time | Old AR Time |
---|---|---|---|---|---|---|---|
portal | 0.68M | 1.971 | 2.755 | 0.740 | 0.779 | 1.143 | 1.944 |
orcas | 1.8M | 3.895 | 6.790 | 0.731 | 0.785 | 3.044 | 6.045 |
3d | 2.2M | 6.995 | 24.76 | 1.117 | 0.950 | 5.761 | 23.757 |
Project Management
- Stakeholders
- Communication
- Use Cases
- Requirements
- Deliverables
- Milestones Associated with a Release
- "Sandbox" Milestones
- Github Workflow
AWS
- AWS Portal Migrations
- Amazon Appliance Workflow
- Overview
- Bringing up a new CHORDS Portal
- Cloud Formation
- EC2 Costing and Memory Constraints
Docker
- Running CHORDS
- Docker on AWS
- Duplicating Docker/Influxdb portals
- Docker on Raspberry Pi
- Docker Details and Tips
- Running CHORDS on Windows 10
Influxdb
Data Formats
Google Maps
Ingest Utilities
Miscellaneous
- Recovery from a full disk
- Github/Dockerhub release scheme
- CHORDS gh-pages and jeykll
- Bootstrap
- CHORDS Portal Web Site
- Dashboard Helper Refactor
- Development Notes
- Heroku
- Meteobridge
- Migrating from mysql to mysql/influxdb portals
- NCAR Wx Stations into CHORDS
- PAWS to CHORDS
- Post Get Query Syntax
- Postgres Testing
- Rails Tips
- Ruby and Rails Resources
- CUAHSI Archive
Historical Archive