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

[metrics] Rework on txpool metrics. #2961

Merged
merged 2 commits into from
Oct 19, 2021
Merged

Conversation

jolestar
Copy link
Member

  1. 重构了 txpool 的 metrics, 通过 counter 统计 event 而不是 gauge。
  2. 增加了测试 metrics 的方法,并在 txpool 测试中使用。

@codecov
Copy link

codecov bot commented Oct 18, 2021

Codecov Report

Merging #2961 (5ad805d) into master (cd108db) will decrease coverage by 0.34%.
The diff coverage is 27.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2961      +/-   ##
==========================================
- Coverage   33.34%   33.01%   -0.33%     
==========================================
  Files         516      516              
  Lines       45141    45269     +128     
  Branches    20545    20623      +78     
==========================================
- Hits        15048    14941     -107     
- Misses      15896    16045     +149     
- Partials    14197    14283      +86     
Flag Coverage Δ
unittests 33.01% <27.66%> (-0.33%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
commons/metrics/src/lib.rs 16.13% <ø> (+1.62%) ⬆️
test-helper/src/lib.rs 100.00% <ø> (ø)
txpool/src/lib.rs 44.74% <7.70%> (-2.58%) ⬇️
txpool/src/test.rs 15.16% <7.90%> (-6.12%) ⬇️
txpool/src/counters.rs 33.34% <33.34%> (-45.23%) ⬇️
txpool/src/tx_pool_service_impl.rs 46.24% <36.00%> (+2.24%) ⬆️
test-helper/src/txpool.rs 30.77% <37.50%> (+5.77%) ⬆️
rpc/server/src/module/pubsub/tests.rs 20.67% <40.00%> (+1.08%) ⬆️
config/src/metrics_config.rs 55.18% <47.83%> (-2.89%) ⬇️
vm/functional-tests/src/genesis_accounts.rs 37.50% <0.00%> (-25.00%) ⬇️
... and 94 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cd108db...5ad805d. Read the comment docs.

@jolestar jolestar merged commit 7ef1c62 into master Oct 19, 2021
@jolestar jolestar deleted the rework_on_metrics_txpool branch October 19, 2021 05:46
@jolestar jolestar linked an issue Oct 29, 2021 that may be closed by this pull request
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.

rework on metrics
2 participants