github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/ui/src/views/devtools/containers/raftMessages/messages.tsx (about) 1 // Copyright 2018 The Cockroach Authors. 2 // 3 // Use of this software is governed by the Business Source License 4 // included in the file licenses/BSL.txt. 5 // 6 // As of the Change Date specified in that file, in accordance with 7 // the Business Source License, use of this software will be governed 8 // by the Apache License, Version 2.0, included in the file 9 // licenses/APL.txt. 10 11 import React from "react"; 12 13 import { LineGraph } from "src/views/cluster/components/linegraph"; 14 import { Metric, Axis, AxisUnits } from "src/views/shared/components/metricQuery"; 15 16 import { GraphDashboardProps } from "src/views/cluster/containers/nodeGraphs/dashboards/dashboardUtils"; 17 18 export default function (props: GraphDashboardProps) { 19 const { nodeSources, tooltipSelection } = props; 20 21 return [ 22 <LineGraph 23 title="Raft App" 24 sources={nodeSources} 25 tooltip={`The number of raft app messages ${tooltipSelection}`} 26 > 27 <Axis label="messages"> 28 <Metric name="cr.store.raft.rcvd.app" title="App" nonNegativeRate /> 29 <Metric name="cr.store.raft.rcvd.appresp" title="AppResp" nonNegativeRate /> 30 </Axis> 31 </LineGraph>, 32 33 <LineGraph 34 title="Raft Heartbeat" 35 sources={nodeSources} 36 tooltip={`The number of raft heartbeat messages ${tooltipSelection}`} 37 > 38 <Axis label="heartbeats"> 39 <Metric name="cr.store.raft.rcvd.heartbeat" title="Heartbeat" nonNegativeRate /> 40 <Metric name="cr.store.raft.rcvd.heartbeatresp" title="HeartbeatResp" nonNegativeRate /> 41 </Axis> 42 </LineGraph>, 43 44 <LineGraph 45 title="Raft Other" 46 sources={nodeSources} 47 tooltip={`The number of other raft messages ${tooltipSelection}`} 48 > 49 <Axis label="messages"> 50 <Metric name="cr.store.raft.rcvd.prop" title="Prop" nonNegativeRate /> 51 <Metric name="cr.store.raft.rcvd.vote" title="Vote" nonNegativeRate /> 52 <Metric name="cr.store.raft.rcvd.voteresp" title="VoteResp" nonNegativeRate /> 53 <Metric name="cr.store.raft.rcvd.snap" title="Snap" nonNegativeRate /> 54 <Metric name="cr.store.raft.rcvd.transferleader" title="TransferLeader" nonNegativeRate /> 55 <Metric name="cr.store.raft.rcvd.timeoutnow" title="TimeoutNow" nonNegativeRate /> 56 <Metric name="cr.store.raft.rcvd.prevote" title="PreVote" nonNegativeRate /> 57 <Metric name="cr.store.raft.rcvd.prevoteresp" title="PreVoteResp" nonNegativeRate /> 58 <Metric name="cr.store.raft.rcvd.dropped" title="Dropped" nonNegativeRate /> 59 </Axis> 60 </LineGraph>, 61 62 <LineGraph 63 title="Raft Time" 64 sources={nodeSources} 65 tooltip={`The time spent in store.processRaft() ${tooltipSelection}`} 66 > 67 <Axis units={AxisUnits.Duration}> 68 <Metric name="cr.store.raft.process.workingnanos" title="Working" nonNegativeRate /> 69 <Metric name="cr.store.raft.process.tickingnanos" title="Ticking" nonNegativeRate /> 70 </Axis> 71 </LineGraph>, 72 73 <LineGraph 74 title="Raft Ticks" 75 sources={nodeSources} 76 tooltip={`The number of raft ticks queued ${tooltipSelection}`} 77 > 78 <Axis label="ticks"> 79 <Metric name="cr.store.raft.ticks" title="Ticks" nonNegativeRate /> 80 </Axis> 81 </LineGraph>, 82 83 <LineGraph 84 title="Pending Heartbeats" 85 sources={nodeSources} 86 tooltip={`The number of raft heartbeats and responses waiting to be coalesced ${tooltipSelection}`} 87 > 88 <Axis label="heartbeats"> 89 <Metric name="cr.store.raft.heartbeats.pending" title="Pending" /> 90 </Axis> 91 </LineGraph>, 92 93 ]; 94 }