LCOV - code coverage report

Current view
top level - src/worker - worker_message.dart
Test
lcov.info
Date
2026-11-07
Legend
Lines
hit
not hit
Branches
taken
not taken
# not executed
HitTotalCoverage
Lines71070.0%
Functions00-
Branches00-
Each row represents a line of source code
LineBranchHitsSource code
1import '../build_options.dart';
2import '../_impl/xplat/_time_stamp.dart';
3
41extension type StreamId._(int handle) {
5 static int _nextId = 1;
6
73 factory StreamId.next() => StreamId._(_nextId++);
8
91 static StreamId? from(dynamic value) =>
103 (value is num) ? StreamId._(value.toInt()) : null;
11}
12
13/// Make [WorkerMessage] a `List` to minimize serialization overhead.
140extension type WorkerMessage(List data) implements Object {
15 /// [travelTime] is set by the receiving end and measures the time (in
16 /// microseconds) it took between the moment the message was serialized and
17 /// the moment it was deserialized.
180 int? get travelTime =>
190 BuildOptions.withTravelTime ? data[_$traveltime] : null;
20
211 void unwrapTravelTime() {
22 if (BuildOptions.withTravelTime) {
232 final ts = Timestamp.from(data[_$traveltime]);
24 if (ts != null) {
253 data[_$traveltime] = Timestamp.now()! - ts;
26 }
27 }
28 }
29}
30
31const _$traveltime = 0;
Choose Features