Skip to content

Commit 3a81f75

Browse files
committed
fix cpu usage in resource-container-monitor
1 parent 376e630 commit 3a81f75

File tree

1 file changed

+1
-1
lines changed
  • internal/apps/msp/apm/service/components/resources-container-monitor/container

1 file changed

+1
-1
lines changed

internal/apps/msp/apm/service/components/resources-container-monitor/container/provider.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func toQueryParams(instanceId string) map[string]*structpb.Value {
6060
}
6161

6262
func (p *provider) getCpuLineGraph(ctx context.Context, startTime, endTime int64, instanceId string) ([]*model.LineGraphMetaData, error) {
63-
statement := fmt.Sprintf("SELECT avg(cpu_usage_percent::field),tostring('usage rate') " +
63+
statement := fmt.Sprintf("SELECT max(cpu_usage_percent::field),tostring('usage rate') " +
6464
"FROM docker_container_summary " +
6565
"WHERE pod_uid::tag=$pod_uid " +
6666
"GROUP BY time()")

0 commit comments

Comments
 (0)