From 7403ec00799d816bf3e082bee0cb577697fbd4ae Mon Sep 17 00:00:00 2001 From: Alexander Potapenko Date: Thu, 18 Jul 2024 09:59:28 +0200 Subject: pkg/cover: show the total count in the coverage report When working with standalone coverage reports, it can be sometimes useful to see the total count of covered basic blocks. Show it together with the percentage and the total number of BBs in the kernel (for the sake of uniformity) --- pkg/cover/templates/cover.html | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/pkg/cover/templates/cover.html b/pkg/cover/templates/cover.html index 6e7bf458b..0c7f46419 100644 --- a/pkg/cover/templates/cover.html +++ b/pkg/cover/templates/cover.html @@ -94,6 +94,18 @@ .active { display: block; } + .total-left { + padding-left: 16px; + } + .total { + float: right; + width: 250px; + padding-right: 4px; + } + .total-right { + float: right; + } + @@ -101,6 +113,12 @@ +
+
+
+ Total coverage: + {{.Root.Covered}} ({{.Root.Percent}}%)of {{.Root.Total}} +
@@ -222,4 +240,4 @@ {{end}} {{end}} -{{end}} \ No newline at end of file +{{end}} -- cgit mrf-deployment