MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / Report

Method Report

cmd/test-streammanager/metrics.go:87–110  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

85}
86
87func (m *Metrics) Report() string {
88 m.lock.Lock()
89 defer m.lock.Unlock()
90
91 duration := m.endTime.Sub(m.startTime)
92 durationSecs := duration.Seconds()
93 if durationSecs == 0 {
94 durationSecs = 1.0
95 }
96 throughput := float64(m.totalBytes) / durationSecs / 1024 / 1024
97
98 return fmt.Sprintf(`
99StreamManager Integration Test Results
100======================================
101Duration: %v
102Total Bytes: %d
103Throughput: %.2f MB/s
104Data Packets: %d
105Ack Packets: %d
106OOO Packets: %d
107Pipe High Water: %d bytes (%.2f KB)
108`, duration, m.totalBytes, throughput, m.dataPackets, m.ackPackets, m.oooPackets,
109 m.pipeHighWaterMark, float64(m.pipeHighWaterMark)/1024)
110}

Callers 1

runTestFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected