优化看板打开速度

This commit is contained in:
GoEdgeLab
2022-03-27 16:39:41 +08:00
parent 29b8abc949
commit 86ae86332e
7 changed files with 910 additions and 711 deletions

View File

@@ -0,0 +1,14 @@
syntax = "proto3";
option go_package = "./pb";
package pb;
// 单个小时统计
message ServerDomainHourlyStat {
int64 serverId = 1;
string domain = 2;
int64 countRequests = 3;
int64 bytes = 4;
int64 countAttackRequests = 6;
int64 attackBytes = 7;
}

View File

@@ -0,0 +1,27 @@
syntax = "proto3";
option go_package = "./pb";
package pb;
import "models/server_domain_hourly_stat.proto";
// 服务域名按小时统计服务
service ServerDomainHourlyStatService {
// 读取服务的域名排行
rpc listTopServerDomainStatsWithServerId(ListTopServerDomainStatsWithServerIdRequest) returns (ListTopServerDomainStatsWithServerIdResponse);
}
// 读取域名排行
message ListTopServerDomainStatsWithServerIdRequest{
int64 nodeClusterId = 1;
int64 nodeId = 2;
int64 serverId = 3;
string hourFrom = 4;
string hourTo = 5;
int64 size = 6;
}
message ListTopServerDomainStatsWithServerIdResponse {
repeated ServerDomainHourlyStat domainStats = 1;
}

View File

@@ -46,7 +46,6 @@ message ComposeServerStatNodeClusterBoardResponse {
repeated DailyTrafficStat dailyTrafficStats = 30;
repeated HourlyTrafficStat hourlyTrafficStats = 31;
repeated NodeStat topNodeStats = 32;
repeated DomainStat topDomainStats = 33;
repeated NodeValue cpuNodeValues = 34;
repeated NodeValue memoryNodeValues = 35;
@@ -82,15 +81,6 @@ message ComposeServerStatNodeClusterBoardResponse {
int64 countAttackRequests = 6;
int64 attackBytes = 7;
}
message DomainStat {
int64 serverId = 1;
string domain = 2;
int64 countRequests = 3;
int64 bytes = 4;
int64 countAttackRequests = 6;
int64 attackBytes = 7;
}
}
// 组合节点看板数据
@@ -114,7 +104,6 @@ message ComposeServerStatNodeBoardResponse {
repeated DailyTrafficStat dailyTrafficStats = 31;
repeated HourlyTrafficStat hourlyTrafficStats = 32;
repeated DomainStat topDomainStats = 33;
repeated NodeValue cpuNodeValues = 34;
repeated NodeValue memoryNodeValues = 35;
@@ -142,15 +131,6 @@ message ComposeServerStatNodeBoardResponse {
int64 countAttackRequests = 6;
int64 attackBytes = 7;
}
message DomainStat {
int64 serverId = 1;
string domain = 2;
int64 countRequests = 3;
int64 bytes = 4;
int64 countAttackRequests = 6;
int64 attackBytes = 7;
}
}
// 组合服务看板数据
@@ -162,7 +142,6 @@ message ComposeServerStatBoardResponse {
repeated DailyTrafficStat dailyTrafficStats = 30;
repeated HourlyTrafficStat hourlyTrafficStats = 31;
repeated NodeStat topNodeStats = 32;
repeated DomainStat topDomainStats = 33;
repeated CountryStat topCountryStats = 35;
repeated MetricDataChart metricDataCharts = 34;
@@ -196,15 +175,6 @@ message ComposeServerStatBoardResponse {
int64 attackBytes = 7;
}
message DomainStat {
int64 serverId = 1;
string domain = 2;
int64 countRequests = 3;
int64 bytes = 4;
int64 countAttackRequests = 6;
int64 attackBytes = 7;
}
message CountryStat {
string countryName = 1;
int64 bytes = 2;