forked from mtusi2026/mtusi2026lab6
Prepare verified laboratory 6 implementation and evidence
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package postgres
|
||||
|
||||
import (
|
||||
"backend/internal/domain/model"
|
||||
"context"
|
||||
)
|
||||
|
||||
func (s *Store) PipelineMetrics(ctx context.Context) (model.PipelineMetrics, error) {
|
||||
r, e := s.q.PipelineMetrics(ctx)
|
||||
if e != nil {
|
||||
return model.PipelineMetrics{}, mapErr(e)
|
||||
}
|
||||
cohort, e := s.q.ReadySLI(ctx)
|
||||
return model.PipelineMetrics{Depth: r.Depth, Oldest: r.Oldest, ReadyMatured: [3]int64{cohort.Matured10, cohort.Matured30, cohort.Matured300}, ReadyTimely: [3]int64{cohort.Timely10, cohort.Timely30, cohort.Timely300}}, mapErr(e)
|
||||
}
|
||||
Reference in New Issue
Block a user