Skip to content

feat: add usage tracking for app and workerpool#60

Merged
Le-Caignec merged 2 commits intomainfrom
feat/add-pertinence-filter
Oct 29, 2025
Merged

feat: add usage tracking for app and workerpool#60
Le-Caignec merged 2 commits intomainfrom
feat/add-pertinence-filter

Conversation

@Le-Caignec
Copy link
Contributor

  • Introduced usageCount and lastUsageTimestamp fields in the App and Workerpool types.
  • Updated usage statistics in the handleOrdersMatched function.
  • Initialized usage fields during app and workerpool transfers.
  • Added unit tests to verify correct accumulation of usage statistics.

- Introduced `usageCount` and `lastUsageTimestamp` fields in the App and Workerpool types.
- Implemented functions to fetch App and Workerpool entities.
- Updated usage statistics in the `handleOrdersMatched` function.
- Initialized usage fields during app and workerpool transfers.
- Added unit tests to verify correct accumulation of usage statistics.
@Le-Caignec Le-Caignec self-assigned this Oct 28, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces usage tracking capabilities for apps and worker pools by adding statistics fields to track how frequently these resources are utilized. The implementation captures usage counts and timestamps whenever deals are matched.

Key changes:

  • Added usageCount and lastUsageTimestamp fields to App and Workerpool entities in the schema
  • Updated the handleOrdersMatched function to increment usage statistics when deals are created
  • Initialized usage fields to zero during app and workerpool transfers

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
schema.graphql Added usage tracking fields (usageCount, lastUsageTimestamp) to App and Workerpool types
src/Modules/IexecPoco.ts Updated handleOrdersMatched to increment usage statistics for apps and worker pools
src/Registries/Appregistry.ts Initialized usage fields to zero when apps are transferred
src/Registries/Workerpoolregistry.ts Initialized usage fields to zero when worker pools are transferred
src/utils.ts Added helper functions fetchApp and fetchWorkerpool to retrieve entities
tests/unit/Modules/IexecPoco.test.ts Added comprehensive test coverage for usage statistics accumulation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Le-Caignec Le-Caignec changed the title feat: add usage tracking for apps and worker pools feat: add usage tracking for app and workerpool Oct 28, 2025
Copy link
Member

@PierreJeanjacquot PierreJeanjacquot left a comment

Choose a reason for hiding this comment

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

LGTM

@Le-Caignec Le-Caignec merged commit c7a2ad3 into main Oct 29, 2025
5 checks passed
@Le-Caignec Le-Caignec deleted the feat/add-pertinence-filter branch October 29, 2025 09:00
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.

4 participants