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

Added balance reporter #1154

Merged
merged 18 commits into from Sep 17, 2021
Merged

Added balance reporter #1154

merged 18 commits into from Sep 17, 2021

Conversation

janezpodhostnik
Copy link
Contributor

@janezpodhostnik janezpodhostnik commented Aug 17, 2021

Added a reporter, that outputs all the FlowVaults ad their locations in a big json.

I use gojq to get data from the json.
examples:
cat balance_report_1628871716.json | gojq '[.Data.[].Balance] | add'
cat balance_report_1628871716.json | gojq '.Data | group_by(.LastComposite) | map({LastComposite: .[0].LastComposite, Balance: map(.Balance) | add }) | sort_by(-.Balance) '

This PR also adds elapsed times of migrations and reporters to the logs. The output will look like this:

9:42PM INF migration 0 is done ledger=complete timeTaken=3.887378355s

@codecov-commenter
Copy link

codecov-commenter commented Aug 19, 2021

Codecov Report

Merging #1154 (d2b6358) into master (bb17974) will decrease coverage by 0.19%.
The diff coverage is 2.72%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1154      +/-   ##
==========================================
- Coverage   56.16%   55.96%   -0.20%     
==========================================
  Files         484      485       +1     
  Lines       29820    29929     +109     
==========================================
+ Hits        16747    16751       +4     
- Misses      10787    10893     +106     
+ Partials     2286     2285       -1     
Flag Coverage Δ
unittests 55.96% <2.72%> (-0.20%) ⬇️

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

Impacted Files Coverage Δ
...execution-state-extract/execution_state_extract.go 75.00% <0.00%> (-1.48%) ⬇️
cmd/util/ledger/migrations/balance_reporter.go 0.00% <0.00%> (ø)
ledger/complete/ledger.go 60.86% <50.00%> (-0.67%) ⬇️
...nsensus/approvals/veryfing_assignment_collector.go 60.40% <0.00%> (+1.34%) ⬆️

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 bb17974...d2b6358. Read the comment docs.

Copy link
Member

@Kay-Zee Kay-Zee left a comment

Choose a reason for hiding this comment

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

Any chance we can also output how long these reporters take? Then we can decide if we want them always on

@janezpodhostnik
Copy link
Contributor Author

Any chance we can also output how long these reporters take? Then we can decide if we want them always on

Done. I edited the description to reflect this.

@janezpodhostnik
Copy link
Contributor Author

bors merge

@bors
Copy link
Contributor

bors bot commented Sep 17, 2021

@bors bors bot merged commit 75dee2c into master Sep 17, 2021
@bors bors bot deleted the janez/get-all-flow-tokens-2 branch September 17, 2021 12:20
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.

None yet

4 participants