From f6dd7a77e4d2c0503672d68ce9f19b42bec99299 Mon Sep 17 00:00:00 2001 From: Taras Madan Date: Tue, 28 Jan 2025 15:17:17 +0100 Subject: pkg/covermerger: stream information about covered functions to dashboard --- pkg/coveragedb/coveragedb.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'pkg/coveragedb') diff --git a/pkg/coveragedb/coveragedb.go b/pkg/coveragedb/coveragedb.go index 0692bc131..f2c1cdd69 100644 --- a/pkg/coveragedb/coveragedb.go +++ b/pkg/coveragedb/coveragedb.go @@ -71,6 +71,19 @@ type MergedCoverageRecord struct { FileData *Coverage } +// FuncLines represents the 'functions' table records. +// It could be used to maps 'hitcounts' from 'files' table to the function names. +type FuncLines struct { + FilePath string + FuncName string + Lines []int64 // List of lines we know belong to this function name according to the addr2line output. +} + +type JSONLWrapper struct { + MCR *MergedCoverageRecord + FL *FuncLines +} + func SaveMergeResult(ctx context.Context, client spannerclient.SpannerClient, descr *HistoryRecord, dec *json.Decoder, sss []*subsystem.Subsystem) (int, error) { if client == nil { -- cgit mrf-deployment