(ctx *gin.Context, start string, end string, limit string)
| 63 | } |
| 64 | |
| 65 | func (i *imlMonitorStatisticController) RestTopN(ctx *gin.Context, start string, end string, limit string) ([]*monitor_dto.TopN, []*monitor_dto.TopN, error) { |
| 66 | s, e, err := formatTime(start, end) |
| 67 | if err != nil { |
| 68 | return nil, nil, err |
| 69 | } |
| 70 | l, err := strconv.Atoi(limit) |
| 71 | if err != nil { |
| 72 | if limit == "" { |
| 73 | l = 10 |
| 74 | } else { |
| 75 | return nil, nil, fmt.Errorf("parse limit %s error: %w", limit, err) |
| 76 | } |
| 77 | } |
| 78 | return i.module.Top(ctx, "", s, e, l, "rest") |
| 79 | } |
| 80 | |
| 81 | func (i *imlMonitorStatisticController) Statistics(ctx *gin.Context, dataType string, input *monitor_dto.StatisticInput) (interface{}, error) { |
| 82 | switch dataType { |
nothing calls this directly
no test coverage detected