DescriptionAdd SourceReport, a class for generating Dart source-level reports.
These reports provide information tied to token positions in the
Dart source program.
SourceReport can generate multiple kinds of reports. Right now it
implements code coverage and call site reports. In the future it
could provide, for example, valid breakpoint sites or source-level
profiles.
Scripts are refered to by index within the report and a script table
is tacked on the end. This avoids a bit of duplication.
In a future cl I will expose this reporting through the vm service.
After that, we can remove our older coverage/callsite code.
----------
Very simple, sample coverage report:
{
"type": "SourceReport",
"ranges": [
{
"scriptIndex": 0,
"startPos": 0,
"endPos": 4,
"compiled": true,
"coverage": {
"hits": [],
"misses": []
}
},
{
"scriptIndex": 0,
"startPos": 6,
"endPos": 10,
"compiled": false
},
{
"scriptIndex": 0,
"startPos": 12,
"endPos": 39,
"compiled": true,
"coverage": {
"hits": [ 23 ],
"misses": [ 32 ]
}
}
],
"scripts": [
{
"type": "@Script",
"fixedId": true,
"id": "libraries\/15\/scripts\/test-lib",
"uri": "test-lib",
"_kind": "script"
}
]
}
R=johnmccutchan@google.com
Committed: https://github.com/dart-lang/sdk/commit/26af34a1b3a912f16f52c69723ca99789d88153b
Patch Set 1 #Patch Set 2 : tweaks #
Total comments: 12
Patch Set 3 : code review #Patch Set 4 : #
Messages
Total messages: 7 (2 generated)
|