From 6b7144acceb96833697f77fcf88d7273e7266c86 Mon Sep 17 00:00:00 2001 From: Kr328 <39107975+Kr328@users.noreply.github.com> Date: Sat, 11 Jan 2020 00:20:10 +0800 Subject: [PATCH] Chore: export reset manager statistic api (#476) --- tunnel/manager.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tunnel/manager.go b/tunnel/manager.go index d4d627e..50c2e11 100644 --- a/tunnel/manager.go +++ b/tunnel/manager.go @@ -61,6 +61,15 @@ func (m *Manager) Snapshot() *Snapshot { } } +func (m *Manager) ResetStatistic() { + m.uploadTemp = 0 + m.uploadBlip = 0 + m.uploadTotal = 0 + m.downloadTemp = 0 + m.downloadBlip = 0 + m.downloadTotal = 0 +} + func (m *Manager) handle() { go m.handleCh(m.upload, &m.uploadTemp, &m.uploadBlip, &m.uploadTotal) go m.handleCh(m.download, &m.downloadTemp, &m.downloadBlip, &m.downloadTotal)