Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

statistics API Unusual #3062

Open
valiner opened this issue Jun 25, 2024 · 1 comment
Open

statistics API Unusual #3062

valiner opened this issue Jun 25, 2024 · 1 comment

Comments

@valiner
Copy link

valiner commented Jun 25, 2024

version v5.2.1

I'm using the statistics API of v2fly. When the traffic is large, the traffic statistics are reset to 0 after a period of time. I've looked through the source code:

type Manager struct { access sync.RWMutex counters map[string]*Counter channels map[string]*Channel running bool }

I didn't find any operation to clear the counters. Can anyone tell me why?

@valiner
Copy link
Author

valiner commented Jun 25, 2024

version v5.2.1 版本 v5.2.1

I'm using the statistics API of v2fly. When the traffic is large, the traffic statistics are reset to 0 after a period of time. I've looked through the source code:我正在使用 v2fly 的统计 API。当流量较大时,一段时间后流量统计信息将重置为 0。我浏览了源代码:

type Manager struct { access sync.RWMutex counters map[string]*Counter channels map[string]*Channel running bool }

I didn't find any operation to clear the counters. Can anyone tell me why?我没有找到任何清除计数器的操作。谁能告诉我为什么?

config

{
"log": {
"loglevel": "debug"
},
"stats": {},
"api": {
"tag": "api",
"services": [
"StatsService"
]
},
"policy": {
"levels": {
"0": {
"statsUserUplink": true,
"statsUserDownlink": true
}
},
"system": {
"statsOutboundUplink": true,
"statsOutboundDownlink": true
}
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant