MCPcopy Index your code
hub / github.com/APIParkLab/APIPark / Top10

Method Top10

controller/service/iml.go:258–273  ·  view source on GitHub ↗
(ctx *gin.Context, serviceId string, start string, end string)

Source from the content-addressed store, hash-verified

256}
257
258func (i *imlServiceController) Top10(ctx *gin.Context, serviceId string, start string, end string) ([]*monitor_dto.TopN, []*monitor_dto.TopN, error) {
259 if serviceId == "" {
260 return nil, nil, fmt.Errorf("serviceId is required")
261 }
262 info, err := i.module.Get(ctx, serviceId)
263 if err != nil {
264 return nil, nil, err
265 }
266
267 s, e, err := formatTime(start, end)
268 if err != nil {
269 return nil, nil, err
270 }
271
272 return i.monitorModule.Top(ctx, serviceId, s, e, 10, info.ServiceKind)
273}
274
275func (i *imlServiceController) QuickCreateAIService(ctx *gin.Context, input *service_dto.QuickCreateAIService) error {
276 return i.transaction.Transaction(ctx, func(txCtx context.Context) error {

Callers

nothing calls this directly

Calls 3

formatTimeFunction · 0.70
GetMethod · 0.65
TopMethod · 0.65

Tested by

no test coverage detected