(ctx context.Context, apiId string, input *monitor_dto.CommonInput)
| 669 | } |
| 670 | |
| 671 | func (i *imlMonitorStatisticModule) APITrend(ctx context.Context, apiId string, input *monitor_dto.CommonInput) (*monitor_dto.MonInvokeCountTrend, string, error) { |
| 672 | clusterId := cluster.DefaultClusterID |
| 673 | wheres, err := i.genCommonWheres(ctx, clusterId) |
| 674 | if err != nil { |
| 675 | return nil, "", err |
| 676 | } |
| 677 | wheres = append(wheres, monitor.MonWhereItem{ |
| 678 | Key: "api", |
| 679 | Operation: "=", |
| 680 | Values: []string{apiId}, |
| 681 | }) |
| 682 | executor, err := i.getExecutor(ctx, clusterId) |
| 683 | if err != nil { |
| 684 | return nil, "", err |
| 685 | } |
| 686 | result, timeInterval, err := executor.InvokeTrend(ctx, formatTimeByMinute(input.Start), formatTimeByMinute(input.End), wheres) |
| 687 | if err != nil { |
| 688 | return nil, "", err |
| 689 | } |
| 690 | return monitor_dto.ToMonInvokeCountTrend(result), timeInterval, nil |
| 691 | } |
| 692 | |
| 693 | func (i *imlMonitorStatisticModule) ProviderTrend(ctx context.Context, providerId string, input *monitor_dto.CommonInput) (*monitor_dto.MonInvokeCountTrend, string, error) { |
| 694 | clusterId := cluster.DefaultClusterID |
nothing calls this directly
no test coverage detected