MCPcopy Index your code
hub / github.com/APIParkLab/APIPark / ProviderTrend

Method ProviderTrend

module/monitor/iml.go:693–713  ·  view source on GitHub ↗
(ctx context.Context, providerId string, input *monitor_dto.CommonInput)

Source from the content-addressed store, hash-verified

691}
692
693func (i *imlMonitorStatisticModule) ProviderTrend(ctx context.Context, providerId string, input *monitor_dto.CommonInput) (*monitor_dto.MonInvokeCountTrend, string, error) {
694 clusterId := cluster.DefaultClusterID
695 wheres, err := i.genCommonWheres(ctx, clusterId)
696 if err != nil {
697 return nil, "", err
698 }
699 wheres = append(wheres, monitor.MonWhereItem{
700 Key: "provider",
701 Operation: "=",
702 Values: []string{providerId},
703 })
704 executor, err := i.getExecutor(ctx, clusterId)
705 if err != nil {
706 return nil, "", err
707 }
708 result, timeInterval, err := executor.InvokeTrend(ctx, formatTimeByMinute(input.Start), formatTimeByMinute(input.End), wheres)
709 if err != nil {
710 return nil, "", err
711 }
712 return monitor_dto.ToMonInvokeCountTrend(result), timeInterval, nil
713}
714
715func (i *imlMonitorStatisticModule) SubscriberTrend(ctx context.Context, subscriberId string, input *monitor_dto.CommonInput) (*monitor_dto.MonInvokeCountTrend, string, error) {
716 clusterId := cluster.DefaultClusterID

Callers

nothing calls this directly

Calls 4

genCommonWheresMethod · 0.95
getExecutorMethod · 0.95
formatTimeByMinuteFunction · 0.70
InvokeTrendMethod · 0.65

Tested by

no test coverage detected