(ctx context.Context, input *monitor_dto.CommonInput)
| 951 | } |
| 952 | |
| 953 | func (i *imlMonitorStatisticModule) InvokeTrend(ctx context.Context, input *monitor_dto.CommonInput) (*monitor_dto.MonInvokeCountTrend, string, error) { |
| 954 | clusterId := cluster.DefaultClusterID |
| 955 | wheres, err := i.genCommonWheres(ctx, clusterId) |
| 956 | if err != nil { |
| 957 | return nil, "", err |
| 958 | } |
| 959 | executor, err := i.getExecutor(ctx, clusterId) |
| 960 | if err != nil { |
| 961 | return nil, "", err |
| 962 | } |
| 963 | result, timeInterval, err := executor.InvokeTrend(ctx, formatTimeByMinute(input.Start), formatTimeByMinute(input.End), wheres) |
| 964 | if err != nil { |
| 965 | return nil, "", err |
| 966 | } |
| 967 | return monitor_dto.ToMonInvokeCountTrend(result), timeInterval, nil |
| 968 | } |
| 969 | |
| 970 | func (i *imlMonitorStatisticModule) genCommonWheres(ctx context.Context, clusterIds ...string) ([]monitor.MonWhereItem, error) { |
| 971 |
nothing calls this directly
no test coverage detected