Project

Profile

Help

Feature #6507

open

TraceListener enhancements for code coverage

Added by Michael Kay about 1 month ago. Updated 28 days ago.

Status:
New
Priority:
Normal
Assignee:
Category:
Diagnostics
Sprint/Milestone:
-
Start date:
2024-08-13
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

Description

Raised following zoom call with Amanda Galtman and Adrian Bird.

XSpec is currently analysing the XML output by the TraceListener and using this to produce a coverage report.

There are two major problems with this.

Firstly, the basic assumption of the TraceListener producing XML output is that we can make it well-formed. This assumption is flawed; it's difficult or impossible to handle try/catch, and it seems fundamentally impossible to handle multithreaded execution. Given these two major obstacles, fixing the relatively minor problems that have been reported (e.g. accumulator evaluation not being traced) seems a poor use of resources.

For coverage analysis, it would be much better

(a) to have a TraceListener that accumulates counts of how often each trace point is encountered (actually, we only need a binary yes/no for current purposes, but a count costs no more and might be useful for other applications.)

(b) to have knowledge of trace points that exist but were not encountered. Currently there's no easily accessible API that provides this information.


Files

CoverageTraceListener.java (10 KB) CoverageTraceListener.java Michael Kay, 2024-08-15 11:29
coverage.xml (16.9 KB) coverage.xml Michael Kay, 2024-08-15 11:51
sample-copy-of-column.xsl (1.99 KB) sample-copy-of-column.xsl A Galtman, 2024-08-19 23:24
sample-copy-of.xml (163 Bytes) sample-copy-of.xml A Galtman, 2024-08-19 23:25

Please register to edit this issue

Also available in: Atom PDF