(ctx context.Context, input *monitor_dto.StatisticInput)
| 641 | } |
| 642 | |
| 643 | func (i *imlMonitorStatisticModule) ProviderStatistics(ctx context.Context, input *monitor_dto.StatisticInput) ([]*monitor_dto.ServiceStatisticBasicItem, error) { |
| 644 | clusterId := cluster.DefaultClusterID |
| 645 | _, err := i.clusterService.Get(ctx, clusterId) |
| 646 | if err != nil { |
| 647 | return nil, err |
| 648 | } |
| 649 | |
| 650 | services, err := i.serviceService.ServiceList(ctx, input.Services...) |
| 651 | if err != nil { |
| 652 | return nil, err |
| 653 | } |
| 654 | |
| 655 | wheres, err := i.genCommonWheres(ctx, clusterId) |
| 656 | if err != nil { |
| 657 | return nil, err |
| 658 | } |
| 659 | |
| 660 | if len(input.Services) > 0 { |
| 661 | wheres = append(wheres, monitor.MonWhereItem{ |
| 662 | Key: "provider", |
| 663 | Operation: "in", |
| 664 | Values: input.Services, |
| 665 | }) |
| 666 | } |
| 667 | |
| 668 | return i.serviceStatistics(ctx, clusterId, services, "provider", formatTimeByMinute(input.Start), formatTimeByMinute(input.End), wheres, 0) |
| 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 |
nothing calls this directly
no test coverage detected