I/O metrics (#224)

* feat: Proxy Node IO stats to the FE

* chore: Sync up FE

* feat: Charts for cache sizes

* feat: All graphs are in

* chore: Remove browserlist
This commit is contained in:
Maciej Hirsz
2020-01-30 15:03:19 +01:00
committed by GitHub
parent 668065c1a8
commit 19f57d71be
14 changed files with 211 additions and 21 deletions
+8 -1
View File
@@ -10,6 +10,7 @@ import {
NodeCount,
NodeDetails,
NodeStats,
NodeIO,
NodeHardware,
NodeLocation,
BlockNumber,
@@ -43,6 +44,7 @@ export const Actions = {
AfgReceivedPrecommit : 0x12 as 0x12,
AfgAuthoritySet : 0x13 as 0x13,
StaleNode : 0x14 as 0x14,
NodeIO : 0x15 as 0x15,
};
export type Action = typeof Actions[keyof typeof Actions];
@@ -70,7 +72,7 @@ export namespace Variants {
export interface AddedNodeMessage extends MessageBase {
action: typeof Actions.AddedNode;
payload: [NodeId, NodeDetails, NodeStats, NodeHardware, BlockDetails, Maybe<NodeLocation>, Timestamp];
payload: [NodeId, NodeDetails, NodeStats, NodeIO, NodeHardware, BlockDetails, Maybe<NodeLocation>, Timestamp];
}
export interface RemovedNodeMessage extends MessageBase {
@@ -103,6 +105,11 @@ export namespace Variants {
payload: [NodeId, NodeHardware];
}
export interface NodeIOMessage extends MessageBase {
action: typeof Actions.NodeIO;
payload: [NodeId, NodeIO];
}
export interface TimeSyncMessage extends MessageBase {
action: typeof Actions.TimeSync;
payload: Timestamp;
+1 -1
View File
@@ -9,4 +9,4 @@ import * as FeedMessage from './feed';
export { Types, FeedMessage };
// Increment this if breaking changes were made to types in `feed.ts`
export const VERSION: Types.FeedVersion = 28 as Types.FeedVersion;
export const VERSION: Types.FeedVersion = 29 as Types.FeedVersion;
+2
View File
@@ -22,6 +22,7 @@ export type Longitude = Opaque<number, 'Longitude'>;
export type City = Opaque<string, 'City'>;
export type MemoryUse = Opaque<number, 'MemoryUse'>;
export type CPUUse = Opaque<number, 'CPUUse'>;
export type Bytes = Opaque<number, 'Bytes'>;
export type BytesPerSecond = Opaque<number, 'BytesPerSecond'>;
export type NetworkId = Opaque<string, 'NetworkId'>;
export type NetworkState = Opaque<string | object, 'NetworkState'>;
@@ -29,6 +30,7 @@ export type NetworkState = Opaque<string | object, 'NetworkState'>;
export type BlockDetails = [BlockNumber, BlockHash, Milliseconds, Timestamp, Maybe<PropagationTime>];
export type NodeDetails = [NodeName, NodeImplementation, NodeVersion, Maybe<Address>, Maybe<NetworkId>];
export type NodeStats = [PeerCount, TransactionCount];
export type NodeIO = [Array<Bytes>, Array<Bytes>, Array<BytesPerSecond>, Array<BytesPerSecond>];
export type NodeHardware = [Array<MemoryUse>, Array<CPUUse>, Array<BytesPerSecond>, Array<BytesPerSecond>, Array<Timestamp>];
export type NodeLocation = [Latitude, Longitude, City];