(ctx context.Context, subscriberId string, input *monitor_dto.CommonInput)
| 713 | } |
| 714 | |
| 715 | func (i *imlMonitorStatisticModule) SubscriberTrend(ctx context.Context, subscriberId string, input *monitor_dto.CommonInput) (*monitor_dto.MonInvokeCountTrend, string, error) { |
| 716 | clusterId := cluster.DefaultClusterID |
| 717 | wheres, err := i.genCommonWheres(ctx, clusterId) |
| 718 | if err != nil { |
| 719 | return nil, "", err |
| 720 | } |
| 721 | wheres = append(wheres, monitor.MonWhereItem{ |
| 722 | Key: "app", |
| 723 | Operation: "=", |
| 724 | Values: []string{subscriberId}, |
| 725 | }) |
| 726 | executor, err := i.getExecutor(ctx, clusterId) |
| 727 | if err != nil { |
| 728 | return nil, "", err |
| 729 | } |
| 730 | result, timeInterval, err := executor.InvokeTrend(ctx, formatTimeByMinute(input.Start), formatTimeByMinute(input.End), wheres) |
| 731 | if err != nil { |
| 732 | return nil, "", err |
| 733 | } |
| 734 | return monitor_dto.ToMonInvokeCountTrend(result), timeInterval, nil |
| 735 | } |
| 736 | |
| 737 | func (i *imlMonitorStatisticModule) InvokeTrendWithSubscriberAndApi(ctx context.Context, apiId string, subscriberId string, input *monitor_dto.CommonInput) (*monitor_dto.MonInvokeCountTrend, string, error) { |
| 738 | clusterId := cluster.DefaultClusterID |
nothing calls this directly
no test coverage detected