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

Method InvokeTrend

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

Source from the content-addressed store, hash-verified

951}
952
953func (i *imlMonitorStatisticModule) InvokeTrend(ctx context.Context, input *monitor_dto.CommonInput) (*monitor_dto.MonInvokeCountTrend, string, error) {
954 clusterId := cluster.DefaultClusterID
955 wheres, err := i.genCommonWheres(ctx, clusterId)
956 if err != nil {
957 return nil, "", err
958 }
959 executor, err := i.getExecutor(ctx, clusterId)
960 if err != nil {
961 return nil, "", err
962 }
963 result, timeInterval, err := executor.InvokeTrend(ctx, formatTimeByMinute(input.Start), formatTimeByMinute(input.End), wheres)
964 if err != nil {
965 return nil, "", err
966 }
967 return monitor_dto.ToMonInvokeCountTrend(result), timeInterval, nil
968}
969
970func (i *imlMonitorStatisticModule) genCommonWheres(ctx context.Context, clusterIds ...string) ([]monitor.MonWhereItem, error) {
971

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