Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Create GET /api/stats/blocks propagation endpoint #5295

Closed
shuse2 opened this issue May 4, 2020 · 0 comments · Fixed by #5915
Closed

Create GET /api/stats/blocks propagation endpoint #5295

shuse2 opened this issue May 4, 2020 · 0 comments · Fixed by #5915

Comments

@shuse2
Copy link
Collaborator

shuse2 commented May 4, 2020

Description

Block propagation (api/stats/blocks)

Subscribe to app:network:event event and check for postBlock, increment for every blockId [blockId] +=1, in { 'id1': count, 'id2': count, ... }

Response:

{ // last 300 blocks should be taken into account
    blocks: { <blockid>: count }, 
    averageReceivedBlock: totalCount/numOfBlockIds, // moving average
    connectedPeers: channel.invoke(app:getConnectedPeers).count
}

Motivation

The monitor plugin requires this endpoint to expose how many times block is received on each node.

Acceptance Criteria

  • Add unit test to check if the above values are exposed
  • Check if the above values are responded by registering to the framework

Additional Information

Related issues: #5216

@ishantiw ishantiw changed the title Create GET /api/performance/propagation endpoint Create GET /api/stats/blocks propagation endpoint Oct 19, 2020
shuse2 added a commit that referenced this issue Oct 27, 2020
Create Monitor Plugin for incoming block statistics - Closes #5295
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants