Skip to content

Commit

Permalink
Merge branch 'seferen-getNetsamplerMetrics' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikolai Samokhin committed Sep 5, 2024
2 parents fd8dd5a + bf51404 commit 0f50dae
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions core/aggregator/netsample/sample.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,38 +90,73 @@ func (s *Sample) SetUserDuration(d time.Duration) {
s.setDuration(keyRTTMicro, d)
}

func (s *Sample) GetUserDurationMicroseconds() int {
return s.get(keyRTTMicro)
}
func (s *Sample) SetUserProto(code int) {
s.set(keyProtoCode, code)
}

func (s *Sample) GetUserProto() int {
return s.get(keyProtoCode)
}

func (s *Sample) SetUserNet(code int) {
s.set(keyErrno, code)
}

func (s *Sample) GetUserNet() int {
return s.get(keyErrno)
}

func (s *Sample) SetConnectTime(d time.Duration) {
s.setDuration(keyConnectMicro, d)
}

func (s *Sample) GetConnectTimeMicroseconds() int {
return s.get(keyConnectMicro)
}

func (s *Sample) SetSendTime(d time.Duration) {
s.setDuration(keySendMicro, d)
}

func (s *Sample) GetSendTimeMicroseconds() int {
return s.get(keySendMicro)
}

func (s *Sample) SetLatency(d time.Duration) {
s.setDuration(keyLatencyMicro, d)
}

func (s *Sample) GetLatencyMicroseconds() int {
return s.get(keyLatencyMicro)
}

func (s *Sample) SetReceiveTime(d time.Duration) {
s.setDuration(keyReceiveMicro, d)
}

func (s *Sample) GetReceiveTimeMicroseconds() int {
return s.get(keyReceiveMicro)
}

func (s *Sample) SetRequestBytes(b int) {
s.set(keyRequestBytes, b)
}

func (s *Sample) GetRequestBytes() int {
return s.get(keyRequestBytes)
}

func (s *Sample) SetResponseBytes(b int) {
s.set(keyResponseBytes, b)
}

func (s *Sample) GetResponseBytes() int {
return s.get(keyResponseBytes)
}

func (s *Sample) String() string {
return string(appendPhout(s, nil, true))
}
Expand Down

0 comments on commit 0f50dae

Please sign in to comment.