mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-12-15 21:36:35 +08:00
实现峰值带宽和平均带宽两种带宽算法
This commit is contained in:
@@ -5,12 +5,13 @@ package pb;
|
||||
|
||||
// 带宽统计数据
|
||||
message ServerBandwidthStat {
|
||||
int64 id = 1;
|
||||
int64 userId = 2;
|
||||
int64 serverId = 3;
|
||||
string day = 4;
|
||||
string timeAt = 5;
|
||||
int64 bytes = 6;
|
||||
int64 bits = 7;
|
||||
int64 nodeRegionId = 8;
|
||||
int64 id = 1; // ID
|
||||
int64 userId = 2; // 用户ID
|
||||
int64 serverId = 3; //服务ID
|
||||
string day = 4; // 日期,格式YYYYMMDD
|
||||
string timeAt = 5; // 时间,格式HHII
|
||||
int64 bytes = 6; // 峰值带宽字节
|
||||
int64 totalBytes = 9; // 总流量
|
||||
int64 bits = 7; // 峰值带宽比特
|
||||
int64 nodeRegionId = 8; // 节点所在区域ID
|
||||
}
|
||||
@@ -25,6 +25,7 @@ message User {
|
||||
bool isDeleted = 16;
|
||||
bool isIndividualIdentified = 17;
|
||||
bool isEnterpriseIdentified = 18;
|
||||
string bandwidthAlgo = 21; // 带宽算法
|
||||
|
||||
Login otpLogin = 19; // OTP认证
|
||||
|
||||
|
||||
@@ -9,5 +9,5 @@ message UserBandwidthStat {
|
||||
int64 userId = 2;
|
||||
string day = 3;
|
||||
string timeAt = 4;
|
||||
int64 bytes = 5;
|
||||
int64 bytes = 5; // 峰值带宽字节
|
||||
}
|
||||
@@ -34,6 +34,7 @@ message FindServerBandwidthStatsRequest {
|
||||
int64 serverId = 1; // 服务ID
|
||||
string month = 2; // YYYYMM,month和day二选一
|
||||
string day = 3; // YYYYMMDD
|
||||
string algo = 4; // 带宽算法,目前支持secondly和avg
|
||||
}
|
||||
|
||||
message FindServerBandwidthStatsResponse {
|
||||
@@ -44,6 +45,7 @@ message FindServerBandwidthStatsResponse {
|
||||
message FindHourlyServerBandwidthStatsRequest {
|
||||
int64 serverId = 1;
|
||||
int32 hours = 2;
|
||||
string algo = 3; // 带宽算法,目前支持secondly和avg
|
||||
}
|
||||
|
||||
message FindHourlyServerBandwidthStatsResponse {
|
||||
@@ -54,8 +56,8 @@ message FindHourlyServerBandwidthStatsResponse {
|
||||
message Stat {
|
||||
string day = 1;
|
||||
int32 hour = 2;
|
||||
int64 bytes = 3;
|
||||
int64 bits = 4;
|
||||
int64 bytes = 3; // 峰值字节/秒
|
||||
int64 bits = 4; // 峰值比特/秒
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,6 +65,7 @@ message FindHourlyServerBandwidthStatsResponse {
|
||||
message FindDailyServerBandwidthStatsRequest {
|
||||
int64 serverId = 1;
|
||||
int32 days = 2;
|
||||
string algo = 3; // 带宽算法,目前支持secondly和avg
|
||||
}
|
||||
|
||||
message FindDailyServerBandwidthStatsResponse {
|
||||
@@ -72,8 +75,8 @@ message FindDailyServerBandwidthStatsResponse {
|
||||
|
||||
message Stat {
|
||||
string day = 1;
|
||||
int64 bytes = 3;
|
||||
int64 bits = 4;
|
||||
int64 bytes = 3; // 峰值字节/秒
|
||||
int64 bits = 4; // 峰值比特/秒
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,6 +88,7 @@ message FindDailyServerBandwidthStatsBetweenDaysRequest {
|
||||
string dayTo = 4; // 结束日期 YYYYMMDD
|
||||
int32 percentile = 5; // 可选项,百分位(nth)带宽位置,0-100之间
|
||||
int64 nodeRegionId = 6; // 区域ID,可选项(目前只有用户整体统计支持区域ID)
|
||||
string algo = 7; // 带宽算法,目前支持secondly和avg
|
||||
}
|
||||
|
||||
message FindDailyServerBandwidthStatsBetweenDaysResponse {
|
||||
@@ -94,7 +98,7 @@ message FindDailyServerBandwidthStatsBetweenDaysResponse {
|
||||
message Stat {
|
||||
string day = 1;
|
||||
string timeAt = 2;
|
||||
int64 bytes = 3; // 字节/秒
|
||||
int64 bits = 4; // 比特/秒
|
||||
int64 bytes = 3; // 峰值字节/秒
|
||||
int64 bits = 4; // 峰值比特/秒
|
||||
}
|
||||
}
|
||||
@@ -144,6 +144,7 @@ message UpdateUserRequest {
|
||||
string remark = 8;
|
||||
bool isOn = 9;
|
||||
int64 nodeClusterId = 10;
|
||||
string bandwidthAlgo = 11;
|
||||
}
|
||||
|
||||
// 删除用户
|
||||
|
||||
Reference in New Issue
Block a user