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

Fix/ block history and add historical utilization of net and cpu #1226

Merged
merged 17 commits into from
Jul 4, 2023

Conversation

Torresmorah
Copy link
Collaborator

@Torresmorah Torresmorah commented Jul 4, 2023

Fix block history performance and add net and cpu utilization per block

What does this PR do?

  • Improve the performance of saving block data
    • Redesign block_history table to use less disk space and improve insertion
    • Remove unused indexes in block_history table
    • Insert many block at once instead of one at a time
    • Momentarily request to the ws one message at a time instead of a thousand
  • When the connection with the socket fails it waits a minute and try again
  • Reduce the frecuency when the last transactions per hour, week and day is updated
  • Remove transaction_history field from stats table
  • Use the average of transaction per block in the transactions query

Steps to test

  1. Run the project locally with the state history plugin in libre blockchain
  2. Check the block_history table
  3. Go to block distribution page and check the results
  4. Go to Stress test dashboard page and check historical block history
  5. Check that the other pages such as block producers, nodes, cpu benchmark are working

@Torresmorah Torresmorah self-assigned this Jul 4, 2023
Copy link
Collaborator

@xavier506 xavier506 left a comment

Choose a reason for hiding this comment

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

LGTM

@xavier506 xavier506 merged commit 647d477 into dev Jul 4, 2023
@xavier506 xavier506 deleted the feat/transaction-and-utilization-history branch July 4, 2023 17:14
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.

3 participants