Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add metrics for TxPool #1937

Closed
8 of 11 tasks
xgreenx opened this issue Jun 5, 2024 · 1 comment · Fixed by #2321
Closed
8 of 11 tasks

Add metrics for TxPool #1937

xgreenx opened this issue Jun 5, 2024 · 1 comment · Fixed by #2321
Assignees
Labels
good first issue Good for newcomers

Comments

@xgreenx
Copy link
Collaborator

xgreenx commented Jun 5, 2024

Metrics for:

  • Number of all transactions in pool
  • Number of immediately executable transactions in pool
  • Number of transactions pending verification
  • (Txs pending verification) how many tasks are created in sync processor
  • (Txs pending verification) and for how long they were active in the sync processor)
  • Size of transactions (when transaction is inserted (meaning: it was accepted for inclusion) - histogram)
  • Time to insert transaction (from when received until it is included in a block)
  • Select transaction for block (how long it took for the selection algorithm to select transactions)

Possibly for follow-up, we first need to create an enum describing the lifetime of the transaction inside TxPool

  • Removed transactions (during which stage)
  • Number of rejected transactions (during verification)
  • Number of squeezed out transactions
@xgreenx xgreenx added the good first issue Good for newcomers label Aug 12, 2024
@xgreenx xgreenx changed the title Add metrics for tx pool Add metrics for TxPool Sep 2, 2024
@acerone85 acerone85 self-assigned this Oct 8, 2024
@acerone85 acerone85 mentioned this issue Oct 8, 2024
18 tasks
acerone85 added a commit that referenced this issue Oct 15, 2024
## Linked Issues/PRs
<!-- List of related issues/PRs -->

Closes #1937

## Description
<!-- List of detailed changes -->
 - [x] Number of all transactions in pool
 - [x] Number of immediately executable transactions in pool
 - [x] Number of transactions pending verification
- [x] (Txs pending verification) how many tasks are created in sync
processor
- [x] (Txs pending verification) and for how long they were active in
the sync processor)
- [x] Size of transactions (when transaction is inserted (meaning: it
was accepted for inclusion) - histogram)
- [x] Time to insert transaction (from when received until it is
included in a block)
- [x] Select transaction for block (how long it took for the selection
algorithm to select transactions)

TODO: 
- [x] Enable metrics only if `config.metrics = true`

## Checklist
- [ ] Breaking changes are clearly marked as such in the PR description
and changelog
- [ ] New behavior is reflected in tests
- [ ] [The specification](https://github.com/FuelLabs/fuel-specs/)
matches the implemented behavior (link update PR if changes are needed)

### Before requesting review
- [ ] I have reviewed the code myself
- [ ] I have created follow-up issues caused by this PR and linked them
here

### After merging, notify other teams

[Add or remove entries as needed]

- [ ] [Rust SDK](https://github.com/FuelLabs/fuels-rs/)
- [ ] [Sway compiler](https://github.com/FuelLabs/sway/)
- [ ] [Platform
documentation](https://github.com/FuelLabs/devrel-requests/issues/new?assignees=&labels=new+request&projects=&template=NEW-REQUEST.yml&title=%5BRequest%5D%3A+)
(for out-of-organization contributors, the person merging the PR will do
this)
- [ ] Someone else?

---------

Co-authored-by: Rafał Chabowski <rafal.chabowski@fuel.sh>
Co-authored-by: rymnc <43716372+rymnc@users.noreply.github.com>
Co-authored-by: Rafał Chabowski <88321181+rafal-ch@users.noreply.github.com>
Co-authored-by: Mitch Turner <james.mitchell.turner@gmail.com>
Co-authored-by: Green Baneling <XgreenX9999@gmail.com>
@rafal-ch rafal-ch mentioned this issue Oct 30, 2024
1 task
@MitchTurner
Copy link
Member

Completed for now. Might reopen in the future :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants