diff options
| author | Taras Madan <tarasmadan@google.com> | 2025-01-29 21:02:20 +0100 |
|---|---|---|
| committer | Taras Madan <tarasmadan@google.com> | 2025-02-06 16:06:49 +0000 |
| commit | 80f71f68ba84a33848ff78da0f62cb472f657a28 (patch) | |
| tree | 85da0793b5a408e6263d1b0ec241c684cf978320 /dashboard/app | |
| parent | 3ee2a9fbdcf66e0e2da29bc30f040070053d9ebb (diff) | |
pkg/cover: split logic, move some data processing to pkg/coveragedb
Diffstat (limited to 'dashboard/app')
| -rw-r--r-- | dashboard/app/coverage.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/dashboard/app/coverage.go b/dashboard/app/coverage.go index c91c7d665..c20030af5 100644 --- a/dashboard/app/coverage.go +++ b/dashboard/app/coverage.go @@ -50,7 +50,7 @@ func GetCoverageDBClient(ctx context.Context) spannerclient.SpannerClient { type funcStyleBodyJS func( ctx context.Context, client spannerclient.SpannerClient, - scope *cover.SelectScope, onlyUnique bool, sss, managers []string, + scope *coveragedb.SelectScope, onlyUnique bool, sss, managers []string, ) (template.CSS, template.HTML, template.HTML, error) func handleCoverageHeatmap(c context.Context, w http.ResponseWriter, r *http.Request) error { @@ -112,7 +112,7 @@ func handleHeatmap(c context.Context, w http.ResponseWriter, r *http.Request, f var style template.CSS var body, js template.HTML if style, body, js, err = f(c, GetCoverageDBClient(c), - &cover.SelectScope{ + &coveragedb.SelectScope{ Ns: hdr.Namespace, Subsystem: ss, Manager: manager, @@ -180,7 +180,7 @@ func handleFileCoverage(c context.Context, w http.ResponseWriter, r *http.Reques } hitLines, hitCounts, err := coveragedb.ReadLinesHitCount( c, client, hdr.Namespace, targetCommit, kernelFilePath, manager, tp) - covMap := cover.MakeCovMap(hitLines, hitCounts) + covMap := coveragedb.MakeCovMap(hitLines, hitCounts) if err != nil { return fmt.Errorf("coveragedb.ReadLinesHitCount(%s): %w", manager, err) } @@ -192,7 +192,7 @@ func handleFileCoverage(c context.Context, w http.ResponseWriter, r *http.Reques if err != nil { return fmt.Errorf("coveragedb.ReadLinesHitCount(*): %w", err) } - covMap = cover.UniqCoverage(cover.MakeCovMap(allHitLines, allHitCounts), covMap) + covMap = coveragedb.UniqCoverage(coveragedb.MakeCovMap(allHitLines, allHitCounts), covMap) } webGit := getWebGit(c) // Get mock if available. |
