Skip to content

feat(metrics): add total records count to MetricsBean (#400) - #421

Merged
aaronbrethorst merged 2 commits into
OneBusAway:mainfrom
0xaboomar:feature/realtime-update-count
Mar 21, 2025
Merged

aaronbrethorst merged 2 commits into
OneBusAway:mainfrom
0xaboomar:feature/realtime-update-count

Conversation

@0xaboomar

@0xaboomar 0xaboomar commented Mar 16, 2025 •

Copy link
Copy Markdown
Member

Summary

This pull request adds support for calculating and storing the count of records included in the last real-time update on a per-agency basis in the MetricsBean.

Resolves issue #400: Add Metric: realtime trip total.

Changes

  1. MetricsBean.java

    • Added a new field realtimeRecordsTotal to store the count of records included in the last real-time update on a per-agency basis.
    • Updated getters and setters for the new field.
  2. MetricsBeanServiceImpl.java

    • Implemented populateTotalRecordsFields method to populate the realtimeRecordsTotal field in MetricsBean.
    • Added getTotalRecordsCounts method to calculate the total records count for each agency.
    • Added getTotalRecordCount method to retrieve the total record count for a specified agency and optional feed.
    • Updated getMetrics method to include the new metric.

@0xaboomar
0xaboomar force-pushed the feature/realtime-update-count branch from a3ee36c to bd7eccd Compare March 17, 2025 22:19
@0xaboomar 0xaboomar closed this Mar 17, 2025
@0xaboomar
0xaboomar force-pushed the feature/realtime-update-count branch from bd7eccd to 9fba593 Compare March 17, 2025 22:23
@0xaboomar 0xaboomar reopened this Mar 17, 2025
- Added a new field realtimeTripCountsTotal to store the count of records included in the last real-time update on a per-agency basis.
- Implemented populateTotalRecordsFields() method to populate the realtimeTripCountsTotal field in MetricsBean.
- Added getTotalRecordsCounts() method to calculate the total records count for each agency.
- Added getTotalRecordCount() method to retrieve the total record count for a specified agency and optional feed.
- Updated getMetrics() method to include the new metric.
…sBean

- Renamed a variable in MetricsBean along with its getter and setter for clarity.
- Added necessary comments in MetricsBeanServiceImpl.java to improve code documentation.
@0xaboomar
0xaboomar force-pushed the feature/realtime-update-count branch from 2df1c9e to cefc970 Compare March 20, 2025 22:54

@aaronbrethorst aaronbrethorst left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good!

@CLAassistant

CLAassistant commented Mar 21, 2025 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@aaronbrethorst
aaronbrethorst merged commit f6cab9f into OneBusAway:main Mar 21, 2025
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.

3 participants