#5065 fix-5603

Merged
zouap merged 4 commits from fix-4948 into V20240109 4 months ago
  1. +6
    -0
      manager/client/grampus/grampus.go

+ 6
- 0
manager/client/grampus/grampus.go View File

@@ -33,6 +33,7 @@ const (

errorIllegalToken = 1005
errorCannotStopCreatingJob = 5008
MAX_MATRICS_SIZE = 1000
)

type GetTokenParams struct {
@@ -370,6 +371,11 @@ func GetGrampusMetrics(jobID string, startTime int64, endTime int64, nodeId ...i

size := int64(math.Ceil(float64(endTime-startTime)/float64(step))) + 1

if size > MAX_MATRICS_SIZE {
step = int64(math.Ceil(float64(size*step) / float64(MAX_MATRICS_SIZE)))
size = MAX_MATRICS_SIZE
}

url = url + "?startTime=" + strconv.FormatInt(startTime, 10) + "&step=" + strconv.FormatInt(step, 10) + "&size=" + strconv.FormatInt(size, 10)
}
res, err := client.R().


Loading…
Cancel
Save