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

calculate tx the lifecycle duration #839

Merged
merged 41 commits into from
Aug 13, 2024
Merged

Conversation

georgehao
Copy link
Member

@georgehao georgehao commented Jun 19, 2024

1. Purpose or design rationale of this PR

Calculate the tx median lifecycle duration.

Background is here: https://www.notion.so/scrollzkp/7ba4e2226275414692228f6332d85621?v=d8d35fc59bae4ad1acf48fdfc616934e&p=2a41bd0b70d54211a7b34e1ea766b14a&pm=s

2. PR title

Your PR title must follow conventional commits (as we are doing squash merge for each PR), so it must start with one of the following types:

  • build: Changes that affect the build system or external dependencies (example scopes: yarn, eslint, typescript)
  • ci: Changes to our CI configuration files and scripts (example scopes: vercel, github, cypress)
  • docs: Documentation-only changes
  • feat: A new feature
  • fix: A bug fix
  • perf: A code change that improves performance
  • refactor: A code change that doesn't fix a bug, or add a feature, or improves performance
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
  • test: Adding missing tests or correcting existing tests

3. Deployment tag versioning

Has the version in params/version.go been updated?

  • This PR doesn't involve a new deployment, git tag, docker image tag, and it doesn't affect traces
  • Yes

4. Breaking change label

Does this PR have the breaking-change label?

  • This PR is not a breaking change
  • Yes

@georgehao georgehao changed the title calculate tx duration calculate tx the median lifecycle duration Jun 19, 2024
core/tx_pool.go Outdated Show resolved Hide resolved
@HAOYUatHZ
Copy link
Member

HAOYUatHZ commented Aug 10, 2024

here we don;t distinguish the "end time" for

  1. tx is included
  2. tx is dropped

then how can it serve your need? we wouldn't know a "lifecycle duration" is for being included or being dropped
image

@georgehao
Copy link
Member Author

here we don;t distinguish the "end time" for

  1. tx is included
  2. tx is dropped

then how can it serve your need? we wouldn't know a "lifecycle duration" is for being included or being dropped image

tx is included we can know this, i think
tx is dropped yes, can't get this. this will affect the p90 statistics, for p50 it's ok

core/tx_pool.go Outdated Show resolved Hide resolved
cmd/geth/main.go Outdated Show resolved Hide resolved
HAOYUatHZ
HAOYUatHZ previously approved these changes Aug 13, 2024
colinlyguo
colinlyguo previously approved these changes Aug 13, 2024
core/tx_pool.go Outdated Show resolved Hide resolved
core/tx_pool.go Outdated Show resolved Hide resolved
core/types/transaction.go Outdated Show resolved Hide resolved
Co-authored-by: colin <102356659+colinlyguo@users.noreply.github.com>
@omerfirmak omerfirmak dismissed stale reviews from colinlyguo and HAOYUatHZ via 45ba630 August 13, 2024 06:02
omerfirmak
omerfirmak previously approved these changes Aug 13, 2024
Co-authored-by: colin <102356659+colinlyguo@users.noreply.github.com>
omerfirmak
omerfirmak previously approved these changes Aug 13, 2024
Co-authored-by: colin <102356659+colinlyguo@users.noreply.github.com>
core/tx_pool.go Outdated Show resolved Hide resolved
@georgehao georgehao merged commit 4b85bbc into develop Aug 13, 2024
8 checks passed
@georgehao georgehao deleted the feat/calculate_tx_duration branch August 13, 2024 08:45
lwedge99 pushed a commit to sentioxyz/scroll-geth that referenced this pull request Aug 27, 2024
* feat: add transactions len metrics of block processer

* calculate tx lifecycle median duration

* chore: auto version bump [bot]

* fix

* fix

* fix

* chore: auto version bump [bot]

* address comments

* remove error code

* address comment

* update

* Update core/tx_pool.go

Co-authored-by: colin <102356659+colinlyguo@users.noreply.github.com>

* Update core/types/transaction.go

Co-authored-by: colin <102356659+colinlyguo@users.noreply.github.com>

* Update core/tx_pool.go

Co-authored-by: colin <102356659+colinlyguo@users.noreply.github.com>

* Update core/tx_pool.go

---------

Co-authored-by: georgehao <georgehao@users.noreply.github.com>
Co-authored-by: Ömer Faruk Irmak <omerfirmak@gmail.com>
Co-authored-by: colin <102356659+colinlyguo@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants