MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / RunsTotal

Method RunsTotal

app/controlplane/pkg/biz/orgmetrics.go:86–100  ·  view source on GitHub ↗
(ctx context.Context, orgID string, timeWindow *TimeWindow, projectIDs []uuid.UUID)

Source from the content-addressed store, hash-verified

84}
85
86func (uc *OrgMetricsUseCase) RunsTotal(ctx context.Context, orgID string, timeWindow *TimeWindow, projectIDs []uuid.UUID) (int32, error) {
87 ctx, span := otelx.Start(ctx, orgMetricsTracer, "OrgMetricsUseCase.RunsTotal")
88 defer span.End()
89
90 orgUUID, err := uuid.Parse(orgID)
91 if err != nil {
92 return 0, err
93 }
94
95 if err := validateTimeWindowIsSet(timeWindow); err != nil {
96 return 0, err
97 }
98
99 return uc.repo.RunsTotal(ctx, orgUUID, timeWindow, projectIDs)
100}
101
102func (uc *OrgMetricsUseCase) RunsTotalByStatus(ctx context.Context, orgID string, timeWindow *TimeWindow, projectIDs []uuid.UUID) (map[string]int32, error) {
103 ctx, span := otelx.Start(ctx, orgMetricsTracer, "OrgMetricsUseCase.RunsTotalByStatus")

Callers

nothing calls this directly

Calls 4

StartFunction · 0.92
validateTimeWindowIsSetFunction · 0.85
ParseMethod · 0.80
RunsTotalMethod · 0.65

Tested by

no test coverage detected