diff options
| author | Taras Madan <tarasmadan@google.com> | 2025-01-28 15:17:17 +0100 |
|---|---|---|
| committer | Taras Madan <tarasmadan@google.com> | 2025-01-29 11:10:34 +0000 |
| commit | f6dd7a77e4d2c0503672d68ce9f19b42bec99299 (patch) | |
| tree | 036ff5155e8a412933c92ec76cd958a589a44f09 /pkg/coveragedb | |
| parent | 323c196b555b718b5bbd19fff0cc82947aa77431 (diff) | |
pkg/covermerger: stream information about covered functions to dashboard
Diffstat (limited to 'pkg/coveragedb')
| -rw-r--r-- | pkg/coveragedb/coveragedb.go | 13 |
1 files changed, 13 insertions, 0 deletions
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 { |
