Documentation ¶
Index ¶
- Constants
- func App(app string) zap.Field
- func Cid(cid string) zap.Field
- func FileId(fileId string) zap.Field
- func Identity(val string) zap.Field
- func Method(val string) zap.Field
- func ObjectId(val string) zap.Field
- func PeerId(val string) zap.Field
- func PeerVersion(val string) zap.Field
- func QueueDur(val time.Duration) zap.Field
- func Size(size int) zap.Field
- func SpaceId(val string) zap.Field
- func TotalDur(val time.Duration) zap.Field
- type Config
- type Metric
- type StreamPoolMetric
- type SyncMetric
- type SyncMetricState
Constants ¶
View Source
const CName = "common.metric"
Variables ¶
This section is empty.
Functions ¶
func PeerVersion ¶ added in v0.2.2
Types ¶
type Metric ¶
type Metric interface { Registry() *prometheus.Registry WrapDRPCHandler(h drpc.Handler) drpc.Handler RequestLog(ctx context.Context, rpc string, fields ...zap.Field) RegisterSyncMetric(spaceId string, syncMetric SyncMetric) UnregisterSyncMetric(spaceId string) RegisterStreamPoolSyncMetric(mtr StreamPoolMetric) UnregisterStreamPoolSyncMetric() app.ComponentRunnable }
type StreamPoolMetric ¶ added in v0.5.0
type SyncMetric ¶ added in v0.5.0
type SyncMetric interface {
SyncMetricState() SyncMetricState
}
type SyncMetricState ¶ added in v0.5.0
type SyncMetricState struct { IncomingMsgCount uint32 IncomingMsgSize uint64 OutgoingMsgCount uint32 OutgoingMsgSize uint64 IncomingReqCount uint32 IncomingReqSize uint64 OutgoingReqCount uint32 OutgoingReqSize uint64 ReceivedRespCount uint32 ReceivedRespSize uint64 SentRespCount uint32 SentRespSize uint64 TotalSize uint64 }
func (*SyncMetricState) Append ¶ added in v0.5.0
func (st *SyncMetricState) Append(other SyncMetricState)
Click to show internal directories.
Click to hide internal directories.