Skip to content

Conversation

@takaokouji
Copy link

Summary

This PR implements the data merge feature in the Mesh V2 extension's RateLimiter to reduce API requests and cost.

Changes

  • RateLimiter Extension: Added support for merging data items in the queue when the same is used.
  • MeshV2Service Integration: Enabled for .
  • sendData Improvements: Refactored to use a bound method , ensuring consistent function references for RateLimiter's merge comparison.
  • Enhanced Logging: Added detailed logs for data changes, merging, and request processing.
  • Comprehensive Testing:
    • Added unit tests for ().
    • Added integration tests for data merging ().

Verification Results

  • All unit and integration tests passed.
  • Linting clean.

Fixes #52

🤖 Generated with Gemini Code

Co-Authored-By: Gemini noreply@google.com

takaokouji and others added 2 commits December 30, 2025 14:38
Details:
- Extended RateLimiter to support merging data items in the queue with the same sendFunction.
- Added enableMerge and mergeKeyField options to RateLimiter constructor.
- Enabled data merging in MeshV2Service for dataRateLimiter.
- Updated MeshV2Service.sendData to use a bound method for consistent sendFunction reference.
- Added detailed logging for merging and request processing.
- Added unit and integration tests to verify the merge feature and unchanged data detection.

🤖 Generated with [Gemini Code](https://gemini.google.com/code)

Co-Authored-By: Gemini <noreply@google.com>
…e documentation

- Deleted unused eventRateLimiter from MeshV2Service constructor
- Added JSDoc to _reportDataBound explaining its role in RateLimiter merge comparison
- Added integration test case for merging multiple variables in MeshV2Service

Co-Authored-By: Gemini <noreply@google.com>
@takaokouji takaokouji merged commit ac23e53 into develop Dec 30, 2025
1 check passed
@takaokouji takaokouji deleted the feature/issue-52-ratelimiter-merge branch December 30, 2025 07:58
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.

Mesh V2: データ送信で最新値のみ送信する実装(RateLimiterマージ機能)

2 participants