profileSnapshot method
Future<List<PaintProfile> >
profileSnapshot(
- SnapshotId snapshotId, {
- int? minRepeatCount,
- num? minDuration,
- Rect? clipRect,
snapshotId
The id of the layer snapshot.
minRepeatCount
The maximum number of times to replay the snapshot (1, if not specified).
minDuration
The minimum duration (in seconds) to replay the snapshot.
clipRect
The clip rectangle to apply when replaying the snapshot.
Returns: The array of paint profiles, one per run.
Implementation
Future<List<PaintProfile>> profileSnapshot(SnapshotId snapshotId,
{int? minRepeatCount, num? minDuration, dom.Rect? clipRect}) async {
var result = await _client.send('LayerTree.profileSnapshot', {
'snapshotId': snapshotId,
if (minRepeatCount != null) 'minRepeatCount': minRepeatCount,
if (minDuration != null) 'minDuration': minDuration,
if (clipRect != null) 'clipRect': clipRect,
});
return (result['timings'] as List)
.map((e) => PaintProfile.fromJson(e as List))
.toList();
}