Skip to content

Commit

Permalink
fix cpu usage in resource-container-monitor
Browse files Browse the repository at this point in the history
  • Loading branch information
chengjoey committed Aug 2, 2024
1 parent 376e630 commit 3a81f75
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func toQueryParams(instanceId string) map[string]*structpb.Value {
}

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

0 comments on commit 3a81f75

Please sign in to comment.