(ctx context.Context, providerId string, input *monitor_dto.StatisticInput)
| 866 | } |
| 867 | |
| 868 | func (i *imlMonitorStatisticModule) ApiStatisticsOnProvider(ctx context.Context, providerId string, input *monitor_dto.StatisticInput) ([]*monitor_dto.ApiStatisticBasicItem, error) { |
| 869 | clusterId := cluster.DefaultClusterID |
| 870 | _, err := i.clusterService.Get(ctx, clusterId) |
| 871 | if err != nil { |
| 872 | return nil, err |
| 873 | } |
| 874 | |
| 875 | apiInfos, err := i.apiService.ListInfoForService(ctx, providerId) |
| 876 | if err != nil { |
| 877 | return nil, err |
| 878 | } |
| 879 | wheres, err := i.genCommonWheres(ctx, clusterId) |
| 880 | if err != nil { |
| 881 | return nil, err |
| 882 | } |
| 883 | wheres = append(wheres, monitor.MonWhereItem{ |
| 884 | Key: "provider", |
| 885 | Operation: "=", |
| 886 | Values: []string{providerId}, |
| 887 | }) |
| 888 | |
| 889 | return i.apiStatistics(ctx, clusterId, apiInfos, formatTimeByMinute(input.Start), formatTimeByMinute(input.End), wheres, 0) |
| 890 | } |
| 891 | |
| 892 | func (i *imlMonitorStatisticModule) ApiStatisticsOnSubscriber(ctx context.Context, subscriberId string, input *monitor_dto.StatisticInput) ([]*monitor_dto.ApiStatisticBasicItem, error) { |
| 893 | clusterId := cluster.DefaultClusterID |
nothing calls this directly
no test coverage detected